]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
CMakeLists: warn if CMAKE_BUILD_TYPE is set/unset
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Oct 2023 16:01:40 +0000 (16:01 +0000)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 16 Oct 2023 16:01:06 +0000 (12:01 -0400)
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 <pdonnell@redhat.com>
CMakeLists.txt

index 9e2af5e3563475b638f542952e5d9998caec1b02..34d035b4df86ba4d74e120e415bc362da315d19b 100644 (file)
@@ -24,9 +24,12 @@ endforeach()
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
 
 if(NOT CMAKE_BUILD_TYPE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
+  message(WARNING "CMAKE_BUILD_TYPE not specified, assuming CMAKE_BUILD_TYPE=Debug because .git exists.")
   set(default_build_type "Debug")
   set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
       STRING "Default BUILD_TYPE is Debug, other options are: RelWithDebInfo, Release, and MinSizeRel." FORCE)
+else()
+  message(WARNING "CMAKE_BUILD_TYPE not specified, leaving unset because .git does NOT exist.")
 endif()
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")