From 66e1044824d07697e6745a516451d75a21808938 Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Wed, 29 Mar 2023 18:50:43 +0200 Subject: fix CMake: -UNDEBUG --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 024d8a50..e6daa815 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,8 +90,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") option(ENABLE_KLEE_ASSERTS "Enable KLEE assertions" ON) if (ENABLE_KLEE_ASSERTS) message(STATUS "KLEE assertions enabled") - # We have to add the undefine to the flags, otherwise "-D-UDNDEBUG" will be added - list(APPEND KLEE_COMPONENT_CXX_FLAGS "-UDNDEBUG") + # We have to undefine `NDEBUG` (which CMake adds by default) using `FLAGS` + # and not `DEFINES` since `target_compile_definitions` does not support `-U`. + list(APPEND KLEE_COMPONENT_CXX_FLAGS "-UNDEBUG") else() message(STATUS "KLEE assertions disabled") list(APPEND KLEE_COMPONENT_CXX_DEFINES "-DNDEBUG") -- cgit 1.4.1