summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/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/ComplexOneConfig/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/ComplexOneConfig/CMakeLists.txt')
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 5a4134d..e4fdc68 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -5,6 +5,14 @@ cmake_minimum_required(VERSION 2.4)
cmake_policy(SET CMP0054 NEW)
project (Complex)
+# Inform the test if the debug configuration is getting built.
+string(APPEND CMAKE_C_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_C_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " -DCOMPLEX_NDEBUG")
+
# Try setting a new policy. The IF test is for coverage.
if(POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)