summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/CMakeLists.txt2
-rw-r--r--Tests/Complex/Executable/complex.cxx17
-rw-r--r--Tests/Complex/cmTestConfigure.h.in2
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx17
-rw-r--r--Tests/ComplexOneConfig/cmTestConfigure.h.in2
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt2
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx17
-rw-r--r--Tests/ComplexRelativePaths/cmTestConfigure.h.in2
9 files changed, 60 insertions, 3 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index e8b1dd4..56784a0 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/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/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 43eb109..c8b6f00 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/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/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in
index 9dbdd0b..eadd2f0 100644
--- a/Tests/Complex/cmTestConfigure.h.in
+++ b/Tests/Complex/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}"
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}"
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index e8b1dd4..56784a0 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/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/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 43eb109..c8b6f00 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/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/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in
index 9dbdd0b..eadd2f0 100644
--- a/Tests/ComplexRelativePaths/cmTestConfigure.h.in
+++ b/Tests/ComplexRelativePaths/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}"