ENH: added testing of the WHILE command
This commit is contained in:
parent
8ea0a1a237
commit
ba3b7c1588
|
@ -237,6 +237,11 @@ FOREACH(x "a")
|
||||||
ENDIF(${x} MATCHES "a")
|
ENDIF(${x} MATCHES "a")
|
||||||
ENDFOREACH(x)
|
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
|
# Configure file
|
||||||
|
|
|
@ -656,6 +656,18 @@ int main()
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
||||||
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
||||||
|
|
||||||
|
// Test WHILE
|
||||||
|
#define WHILE_VALUE ${while_var}
|
||||||
|
|
||||||
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
||||||
|
|
|
@ -237,6 +237,11 @@ FOREACH(x "a")
|
||||||
ENDIF(${x} MATCHES "a")
|
ENDIF(${x} MATCHES "a")
|
||||||
ENDFOREACH(x)
|
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
|
# Configure file
|
||||||
|
|
|
@ -656,6 +656,18 @@ int main()
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
||||||
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
||||||
|
|
||||||
|
// Test WHILE
|
||||||
|
#define WHILE_VALUE ${while_var}
|
||||||
|
|
||||||
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
||||||
|
|
|
@ -237,6 +237,11 @@ FOREACH(x "a")
|
||||||
ENDIF(${x} MATCHES "a")
|
ENDIF(${x} MATCHES "a")
|
||||||
ENDFOREACH(x)
|
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
|
# Configure file
|
||||||
|
|
|
@ -656,6 +656,18 @@ int main()
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
#define FOREACH_VAR2 "${FOREACH_VAR2}"
|
||||||
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
|
||||||
|
|
||||||
|
// Test WHILE
|
||||||
|
#define WHILE_VALUE ${while_var}
|
||||||
|
|
||||||
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
|
||||||
|
|
||||||
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
|
||||||
|
|
Loading…
Reference in New Issue