From 1d02f4be22240db427ed15e296c9abc956f14214 Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Tue, 7 Jan 2025 16:02:55 -0800 Subject: [PATCH] [build] Change how CMake details are printed 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. --- CMakeLists.txt | 5 ----- cmake/bazel.rc.in | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2f336f3ce97..00f183b21184 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cmake/bazel.rc.in b/cmake/bazel.rc.in index b3a139abc9b2..251bd5e0e4a2 100644 --- a/cmake/bazel.rc.in +++ b/cmake/bazel.rc.in @@ -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@