Skip to content

Commit 8c9bc07

Browse files
committed
cmake: Fix the bootstrap code to recognize CMAKE_BUILD_TYPE
This is needed for non-multi-config generators such as make. Without the fix, bootstrap() command was setting CMAKE_BUILD_TYPE to empty string which was not correct.
1 parent 2adca25 commit 8c9bc07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cdk/cmake/bootstrap.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ function(bootstrap)
7676
list(APPEND cmake_opts "-T" ${CMAKE_GENERATOR_TOOLSET})
7777
endif()
7878

79+
if(CMAKE_BUILD_TYPE)
80+
message("-- build type: ${CMAKE_BUILD_TYPE}")
81+
list(APPEND cmake_opts "-D" "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
82+
endif()
83+
7984
message("-- ----")
8085

8186
execute_process(

0 commit comments

Comments
 (0)