Skip to content

Commit

Permalink
[cmake] Change how rcfile details are printed
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 upon CMake configuration, only upon CMake generation.
  • Loading branch information
jwnimmer-tri committed Jan 8, 2025
1 parent 5dc9745 commit 041e3cd
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 @@ -562,11 +562,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 041e3cd

Please sign in to comment.