Skip to content

Commit ab6abf8

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
CMake builds: avoid NDEBUG in RelWithDebInfo builds
Just like is done for Release builds, NDEBUG shouldn't be set for RelWithDebInfo builds either. Although we are trying to move away from straight "assert" and use invariants instead, we a) haven't completed this yet and b) imported code such as optional.hpp continues to use "assert."
1 parent 00fb335 commit ab6abf8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
2222
)
2323
# Ensure NDEBUG is not set for release builds
2424
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
25+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
2526
# Enable lots of warnings
2627
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -Wno-deprecated-declarations")
2728
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

0 commit comments

Comments
 (0)