summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/CMakeLists.txt5
-rw-r--r--Tests/Complex/Executable/complex.cxx12
-rw-r--r--Tests/Complex/cmTestConfigure.h.in3
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt5
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx12
-rw-r--r--Tests/ComplexOneConfig/cmTestConfigure.h.in3
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt5
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx12
-rw-r--r--Tests/ComplexRelativePaths/cmTestConfigure.h.in3
9 files changed, 60 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index ca186bb..35f8ef2 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
+# test WHILE command
+SET (while_var 1)
+WHILE (while_var LESS 1000)
+ SET(while_var ${while_var}0)
+ENDWHILE(while_var LESS 1000)
#
# Configure file
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 6c62da3..85fe299 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -657,6 +657,18 @@ int main()
#endif
// ----------------------------------------------------------------------
+ // Test WHILE
+
+ if(WHILE_VALUE != 1000)
+ {
+ cmFailed("WHILE command is not working");
+ }
+ else
+ {
+ cmPassed("WHILE command is working");
+ }
+
+ // ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#ifndef FILENAME_VAR_PATH_NAME
diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in
index 0d380b1..35c10b4 100644
--- a/Tests/Complex/cmTestConfigure.h.in
+++ b/Tests/Complex/cmTestConfigure.h.in
@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
+// Test WHILE
+#define WHILE_VALUE ${while_var}
+
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index ca186bb..35f8ef2 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
+# test WHILE command
+SET (while_var 1)
+WHILE (while_var LESS 1000)
+ SET(while_var ${while_var}0)
+ENDWHILE(while_var LESS 1000)
#
# Configure file
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 6c62da3..85fe299 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -657,6 +657,18 @@ int main()
#endif
// ----------------------------------------------------------------------
+ // Test WHILE
+
+ if(WHILE_VALUE != 1000)
+ {
+ cmFailed("WHILE command is not working");
+ }
+ else
+ {
+ cmPassed("WHILE command is working");
+ }
+
+ // ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#ifndef FILENAME_VAR_PATH_NAME
diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in
index 0d380b1..35c10b4 100644
--- a/Tests/ComplexOneConfig/cmTestConfigure.h.in
+++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in
@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
+// Test WHILE
+#define WHILE_VALUE ${while_var}
+
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index ca186bb..35f8ef2 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/CMakeLists.txt
@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
+# test WHILE command
+SET (while_var 1)
+WHILE (while_var LESS 1000)
+ SET(while_var ${while_var}0)
+ENDWHILE(while_var LESS 1000)
#
# Configure file
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 6c62da3..85fe299 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -657,6 +657,18 @@ int main()
#endif
// ----------------------------------------------------------------------
+ // Test WHILE
+
+ if(WHILE_VALUE != 1000)
+ {
+ cmFailed("WHILE command is not working");
+ }
+ else
+ {
+ cmPassed("WHILE command is working");
+ }
+
+ // ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#ifndef FILENAME_VAR_PATH_NAME
diff --git a/Tests/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in
index 0d380b1..35c10b4 100644
--- a/Tests/ComplexRelativePaths/cmTestConfigure.h.in
+++ b/Tests/ComplexRelativePaths/cmTestConfigure.h.in
@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
+// Test WHILE
+#define WHILE_VALUE ${while_var}
+
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"