summaryrefslogtreecommitdiffstats
path: root/Tests/Preprocess/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-01 16:19:33 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-01 16:29:22 (GMT)
commit44189d82a7d20d0d74c6d4c8c5ac9314a5af4947 (patch)
treeb26bb7b2a3abb3d1ed53e5be5e4c185aefd37c77 /Tests/Preprocess/CMakeLists.txt
parentd10cbb05906de570f45d873296867dad4f90d93a (diff)
downloadCMake-44189d82a7d20d0d74c6d4c8c5ac9314a5af4947.zip
CMake-44189d82a7d20d0d74c6d4c8c5ac9314a5af4947.tar.gz
CMake-44189d82a7d20d0d74c6d4c8c5ac9314a5af4947.tar.bz2
Tests: Fix some tests under CFLAGS=-DNDEBUG CXXFLAGS=-DNDEBUG
Fixes: #23888
Diffstat (limited to 'Tests/Preprocess/CMakeLists.txt')
-rw-r--r--Tests/Preprocess/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index 4347459..84ca5e8 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -197,9 +197,14 @@ endif()
#-----------------------------------------------------------------------------
# Inform the test if the debug configuration is getting built.
-# The NDEBUG definition takes care of this for release.
string(APPEND CMAKE_C_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DPREPROCESS_NDEBUG")
# Inform the test if it built from Xcode.
if(PP_XCODE)