summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx6
2 files changed, 9 insertions, 1 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index d273ac8..5c67094 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -81,6 +81,10 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
ADD_DEFINITIONS(-DCMAKE_IS_FUN)
ADD_DEFINITIONS(-DCMAKE_IS_REALLY_FUN)
+SET_PROPERTY(DIRECTORY
+ PROPERTY COMPILE_DEFINITIONS_RELEASE
+ CMAKE_IS_FUN_IN_RELEASE_MODE
+ )
SET(TEST_SEP "a b c")
SEPARATE_ARGUMENTS(TEST_SEP)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 8eaa661..bf07a37 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -61,7 +61,11 @@ void cmPassed(const char* Message, const char* m2="")
#endif
#ifndef CMAKE_IS_REALLY_FUN
-This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
+# error This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work
+#endif
+
+#if defined(NDEBUG) && !defined(CMAKE_IS_FUN_IN_RELEASE_MODE)
+# error Per-configuration directory-level definition not inherited.
#endif
#ifdef COMPLEX_TEST_CMAKELIB