mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
cmake: make "WITH_CEPH_DEBUG_MUTEX" depend on CMAKE_BUILD_TYPE
this option is available only if CMAKE_BUILD_TYPE is Debug. this change helps us to unify the checks for WITH_CEPH_DEBUG_MUTEX, without this change, we always have to check both WITH_CEPH_DEBUG_MUTEX *and* CMAKE_BUILD_TYPE. after this change, we only respect WITH_CEPH_DEBUG_MUTEX. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
fcdc229175
commit
403f1ec288
@ -320,7 +320,8 @@ if(WITH_LZ4)
|
||||
set(HAVE_LZ4 ${LZ4_FOUND})
|
||||
endif(WITH_LZ4)
|
||||
|
||||
option(WITH_CEPH_DEBUG_MUTEX "Use debug ceph::mutex with lockdep" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(WITH_CEPH_DEBUG_MUTEX "Use debug ceph::mutex with lockdep" ON
|
||||
"CMAKE_BUILD_TYPE STREQUAL Debug" OFF)
|
||||
|
||||
#if allocator is set on command line make sure it matches below strings
|
||||
set(ALLOCATOR "" CACHE STRING
|
||||
|
@ -113,7 +113,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
STRING "Default BUILD_TYPE is Debug, other options are: RelWithDebInfo, Release, and MinSizeRel." FORCE)
|
||||
endif()
|
||||
|
||||
if(WITH_CEPH_DEBUG_MUTEX OR CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
if(WITH_CEPH_DEBUG_MUTEX)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-DCEPH_DEBUG_MUTEX>)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user