diff options
author | Kefu Chai <kchai@redhat.com> | 2021-03-12 12:29:54 +0100 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2021-03-12 14:00:19 +0100 |
commit | 403f1ec2888a495fd3e40abbdb10c82793e22521 (patch) | |
tree | ae946629c7f4f8bbbbc59255897b9b9f776d22c4 /CMakeLists.txt | |
parent | Merge pull request #40004 from vshankar/wip-cephfs-mirror-symlink-overrun (diff) | |
download | ceph-403f1ec2888a495fd3e40abbdb10c82793e22521.tar.xz ceph-403f1ec2888a495fd3e40abbdb10c82793e22521.zip |
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>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e41dc43bb54..f3512d60ce4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 |