Skip to content

Commit bf5422f

Browse files
authored
Propagate CMAKE_BUILD_TYPE to external projects (#1763)
Ensures external dependencies like Google Benchmark inherit the main project's build type, preventing unoptimized debug builds and timing warnings. Fixes #1761
1 parent 955b828 commit bf5422f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmake/modules/AddClad.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ function(clad_externalproject_add NAME)
249249
${FORWARDED_ARGS}
250250
CMAKE_ARGS
251251
-G "${CMAKE_GENERATOR}"
252+
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
252253
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
253254
-DCMAKE_C_FLAGS=${C_FLAGS_EXT}
254255
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}

0 commit comments

Comments
 (0)