Skip to content

Commit b8c6ba0

Browse files
committed
CMakeLists: warn if CMAKE_BUILD_TYPE is set/unset
At some point the debug builds for wip branches no longer had the .git directory available so the Debug build type was unset. This meant we are no longer doing numerous checks (like mutex ownership checks) that we would normally be doing in the qa suite. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 4a426ea commit b8c6ba0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ endforeach()
2424
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
2525

2626
if(NOT CMAKE_BUILD_TYPE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
27+
message(WARNING "CMAKE_BUILD_TYPE not specified, assuming CMAKE_BUILD_TYPE=Debug because .git exists.")
2728
set(default_build_type "Debug")
2829
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
2930
STRING "Default BUILD_TYPE is Debug, other options are: RelWithDebInfo, Release, and MinSizeRel." FORCE)
31+
else()
32+
message(WARNING "CMAKE_BUILD_TYPE not specified, leaving unset because .git does NOT exist.")
3033
endif()
3134

3235
if(CMAKE_SYSTEM_NAME MATCHES "Linux")

0 commit comments

Comments
 (0)