Skip to content

Commit

Permalink
[build] Change how CMake details are printed (#22420)
Browse files Browse the repository at this point in the history
Print our verbose build settings when we actually run the build, not
during CMake configuration. This is nicer and more accurate anyway,
but will soon be required since Bazel loads MODULE.bazel more eagerly
than WORKSPACE.bazel and the override_repository generated files do
not yet exist during CMake configuration, rather only after CMake
generation.
  • Loading branch information
jwnimmer-tri authored Jan 9, 2025
1 parent e7d5dc5 commit a9acf19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,6 @@ find_package(Git)

set(GIT_DIR "${PROJECT_SOURCE_DIR}/.git")

execute_process(
COMMAND "${Bazel_EXECUTABLE}" info --announce_rc
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/drake_build_cwd"
)

set(GENERATE_DRAKE_VERSION_ARGS)
if(DEFINED DRAKE_VERSION_OVERRIDE)
list(APPEND GENERATE_DRAKE_VERSION_ARGS
Expand Down
3 changes: 3 additions & 0 deletions cmake/bazel.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# The scratch directory Bazel will use for the build.
startup --output_base="@BAZEL_OUTPUT_BASE@"

# Be verbose.
common --announce_rc

# Inherit Drake's default options.
@BAZELRC_IMPORT@

Expand Down

0 comments on commit a9acf19

Please sign in to comment.