summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx15
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake5
-rw-r--r--Tests/ComplexOneConfig/cmTestConfigure.h.in1
3 files changed, 21 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 454b2c6..f1fe92d 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -359,6 +359,21 @@ int main()
}
#endif
+#ifndef FOREACH_CONCAT
+ cmFailed("the FOREACH, SET or CONFIGURE_FILE command is broken, "
+ "FOREACH_CONCAT is not defined.");
+#else
+ if(strcmp(FOREACH_CONCAT, "abcdefg") != 0)
+ {
+ cmFailed("the FOREACH, SET or CONFIGURE_FILE command is broken, "
+ "FOREACH_CONCAT == ", FOREACH_CONCAT);
+ }
+ else
+ {
+ cmPassed("FOREACH_CONCAT == ", FOREACH_CONCAT);
+ }
+#endif
+
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index 5c444f5..48d04c1 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -102,6 +102,11 @@ FOREACH (INDEX 1 2)
SET(FOREACH_VAR${INDEX} "VALUE${INDEX}")
ENDFOREACH(INDEX)
+SET(FOREACH_CONCAT "")
+FOREACH (INDEX "a;b;c;d;e;f;g")
+ SET(FOREACH_CONCAT "${FOREACH_CONCAT}${INDEX}")
+ENDFOREACH(INDEX)
+
#
# Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#
diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in
index 2ea6388..0d4caee 100644
--- a/Tests/ComplexOneConfig/cmTestConfigure.h.in
+++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in
@@ -10,6 +10,7 @@
#define FOREACH_VAR1 "${FOREACH_VAR1}"
#define FOREACH_VAR2 "${FOREACH_VAR2}"
+#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations