Skip to content
Snippets Groups Projects
Commit 48c45a00 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Do not include VALGRIND and <assert.h> code in RelWithDebugInfo builds.

parent 7e0b1619
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ endif()
# Perform build type specific configuration.
#
set (CMAKE_C_FLAGS_DEBUG "-ggdb -O0 -fexceptions -funwind-tables")
set (CMAKE_C_FLAGS_RELWITHDEBUGINFO "-ggdb -O2 -fexceptions -funwind-tables")
set (CMAKE_C_FLAGS_RELWITHDEBUGINFO "-ggdb -O2 -fexceptions -funwind-tables -DNDEBUG -DNVALGRIND")
set (CMAKE_C_FLAGS_RELEASE "-DNDEBUG -DNVALGRIND")
#
......@@ -156,6 +156,9 @@ endif()
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set (core_cflags "${core_cflags} -Werror")
else()
# Remove VALGRIND code and assertions in *any* type of release build.
set (core_cflags "${core_cflags} -DNDEBUG -DNVALGRIND")
endif()
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment