diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index ca186bb65..35f8ef2c5 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 6c62da37b..85fe29957 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -656,6 +656,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 diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in index 0d380b105..35c10b4db 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 ca186bb65..35f8ef2c5 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 6c62da37b..85fe29957 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -656,6 +656,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 diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in index 0d380b105..35c10b4db 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 ca186bb65..35f8ef2c5 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 6c62da37b..85fe29957 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -656,6 +656,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 diff --git a/Tests/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in index 0d380b105..35c10b4db 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}"