diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -295,11 +295,11 @@ # 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()