diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-03 21:40:51 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-03 21:40:51 (GMT) |
commit | 2c73d2e0f3c5ab4da8ef78bd99309522c05349a0 (patch) | |
tree | fac80fa3d96669f88059ad5ca5fb847b9b1bad7b /Tests/ComplexOneConfig | |
parent | b08a151722ecb23383079f27389313f34ceba6cd (diff) | |
download | CMake-2c73d2e0f3c5ab4da8ef78bd99309522c05349a0.zip CMake-2c73d2e0f3c5ab4da8ef78bd99309522c05349a0.tar.gz CMake-2c73d2e0f3c5ab4da8ef78bd99309522c05349a0.tar.bz2 |
ENH: add new cmakedefine01 feature from bug report 2603
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}" |