diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-03-19 12:43:51 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-03-19 12:43:51 +0000 |
commit | 8eaa19010f3263ab2b95bfc428189d16eb8e95b0 (patch) | |
tree | d1585d19b119f635a4ac66f5526f3500b7a00d81 /CMakeLists.txt | |
parent | c1244c096dd9d314465a985e06d97450c8c871a2 (diff) | |
download | tigervnc-8eaa19010f3263ab2b95bfc428189d16eb8e95b0.tar.gz tigervnc-8eaa19010f3263ab2b95bfc428189d16eb8e95b0.zip |
We don't want to lose the checks performed by assert() in release builds
so make sure we remove NDEBUG. Based on work by Tim Waugh for Red Hat.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5168 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 57b0f032..2593a64b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,14 @@ endif() message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}") add_definitions(-D__BUILD__="${BUILD}") +# We want to keep our asserts even in release builds so remove NDEBUG +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -UNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -UNDEBUG") +set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -UNDEBUG") +set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG") + if(NOT DEFINED BUILD_WINVNC) set(BUILD_WINVNC 1) endif() |