diff options
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 17 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/cmTestConfigure.h.in | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index e8b1dd4..56784a0 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -243,6 +243,8 @@ WHILE (while_var LESS 1000) SET(while_var ${while_var}0) ENDWHILE(while_var LESS 1000) +SET(SHOULD_BE_ZERO ) +SET(SHOULD_BE_ONE 1) # # Configure file # (plug vars to #define so that they can be tested) diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 43eb109..c8b6f00 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -1114,7 +1114,22 @@ int main() #else cmFailed("Generated header included by non-generated source failed."); #endif - + if(SHOULD_BE_ZERO == 0) + { + cmPassed("cmakedefine01 is working for 0"); + } + else + { + cmFailed("cmakedefine01 is not working for 0"); + } + if(SHOULD_BE_ONE == 1) + { + cmPassed("cmakedefine01 is working for 1"); + } + else + { + cmFailed("cmakedefine01 is not working for 1"); + } #ifdef FORCE_TEST cmFailed("CMake SET CACHE FORCE"); #else diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in index 9dbdd0b..eadd2f0 100644 --- a/Tests/ComplexOneConfig/cmTestConfigure.h.in +++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in @@ -39,6 +39,8 @@ #cmakedefine CMAKE_NO_ANSI_STRING_STREAM #cmakedefine CMAKE_NO_ANSI_FOR_SCOPE +#cmakedefine01 SHOULD_BE_ZERO +#cmakedefine01 SHOULD_BE_ONE // Needed to check for files #define BINARY_DIR "${Complex_BINARY_DIR}" |