diff options
author | David Cole <david.cole@kitware.com> | 2012-06-25 12:25:51 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-06-25 12:25:51 (GMT) |
commit | 361696ae2073b537545755e8ef765d080490d244 (patch) | |
tree | 7a84ef240697516999d36ec54b92658ee9d4098a /Tests/CTestConfig | |
parent | c77b57ba7d8198a71d8d90a4eac5bcd526050cf9 (diff) | |
download | CMake-361696ae2073b537545755e8ef765d080490d244.zip CMake-361696ae2073b537545755e8ef765d080490d244.tar.gz CMake-361696ae2073b537545755e8ef765d080490d244.tar.bz2 |
CTest: Add test to verify -D variable definitions work
Diffstat (limited to 'Tests/CTestConfig')
-rw-r--r-- | Tests/CTestConfig/ScriptWithArgs.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CTestConfig/ScriptWithArgs.cmake b/Tests/CTestConfig/ScriptWithArgs.cmake new file mode 100644 index 0000000..79896a7 --- /dev/null +++ b/Tests/CTestConfig/ScriptWithArgs.cmake @@ -0,0 +1,16 @@ +set(CTEST_RUN_CURRENT_SCRIPT 0) + +macro(check_arg name expected_value) + message("${name}='${${name}}'") + if(NOT "${${name}}" STREQUAL "${expected_value}") + message(FATAL_ERROR "unexpected ${name} value '${${name}}', expected '${expected_value}'") + endif() +endmacro() + +check_arg(arg1 "this") +check_arg(arg2 "that") +check_arg(arg3 "the other") +check_arg(arg4 "this is the fourth") +check_arg(arg5 "the_fifth") +check_arg(arg6 "value-with-type") +check_arg(arg7 "") |