From: Martin Storsjö Date: Wed, 4 May 2022 09:52:20 +0000 (+0300) Subject: [libunwind] [CMake] Handle the RelWithDebInfo configuration similarly to Release X-Git-Tag: upstream/15.0.7~8632 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1f8899a18822ede04d8f90cbdae29d66333d7dc;p=platform%2Fupstream%2Fllvm.git [libunwind] [CMake] Handle the RelWithDebInfo configuration similarly to Release This makes sure to include libunwind log messages in the build if LIBUNWIND_ENABLE_ASSERTIONS is set (which it is by default), when building in RelWithDebInfo configurations. Differential Revision: https://reviews.llvm.org/D124912 --- diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 6a76917..632316b 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -295,11 +295,11 @@ if (LIBUNWIND_ENABLE_ASSERTIONS) # On Release builds cmake automatically defines NDEBUG, so we # explicitly undefine it: - if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE") + if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") add_compile_flags(-UNDEBUG) endif() else() - if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE") + if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") add_compile_flags(-DNDEBUG) endif() endif()