diff options
author | Brad King <brad.king@kitware.com> | 2015-07-14 13:41:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-14 14:25:38 (GMT) |
commit | e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch) | |
tree | 6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/CMakeTests/GetPropertyTest.cmake.in | |
parent | 0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff) | |
download | CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.zip CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.gz CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.bz2 |
Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
Diffstat (limited to 'Tests/CMakeTests/GetPropertyTest.cmake.in')
-rw-r--r-- | Tests/CMakeTests/GetPropertyTest.cmake.in | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/Tests/CMakeTests/GetPropertyTest.cmake.in b/Tests/CMakeTests/GetPropertyTest.cmake.in index e99193e..1ad8956 100644 --- a/Tests/CMakeTests/GetPropertyTest.cmake.in +++ b/Tests/CMakeTests/GetPropertyTest.cmake.in @@ -1,5 +1,3 @@ -include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") - get_property(FOO_BRIEF GLOBAL PROPERTY FOO BRIEF_DOCS) get_property(FOO_FULL GLOBAL PROPERTY FOO FULL_DOCS) @@ -16,97 +14,3 @@ get_property(result VARIABLE PROPERTY test_var) if(NOT result STREQUAL "alpha") message(SEND_ERROR "bad value of VARIABLE PROPERTY test_var: got '${result}' instead of 'alpha'") endif() - -include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake") -REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") - -set(Missing-Argument-RESULT 1) -set(Missing-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Missing-Argument.cmake:1 \\(get_property\\):.*get_property called with incorrect number of arguments.*") - -check_cmake_test(GetProperty - Missing-Argument -) - -set(Bad-Scope-RESULT 1) -set(Bad-Scope-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Scope.cmake:1 \\(get_property\\):.*get_property given invalid scope FOO\\..*") - -check_cmake_test(GetProperty - Bad-Scope -) - -set(Bad-Argument-RESULT 1) -set(Bad-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Argument.cmake:1 \\(get_property\\):.*get_property given invalid argument \"FOO\"\\..*") - -check_cmake_test(GetProperty - Bad-Argument -) - -set(No-Property-RESULT 1) -set(No-Property-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Property.cmake:1 \\(get_property\\):.*get_property not given a PROPERTY <name> argument\\..*") - -check_cmake_test(GetProperty - No-Property -) - -set(Global-Name-RESULT 1) -set(Global-Name-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Global-Name.cmake:1 \\(get_property\\):.*get_property given name for GLOBAL scope\\..*") - -check_cmake_test(GetProperty - Global-Name -) - -set(Bad-Directory-RESULT 1) -set(Bad-Directory-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Directory.cmake:1 \\(get_property\\):.*get_property DIRECTORY scope provided but requested directory was not.*found\\..*") - -check_cmake_test(GetProperty - Bad-Directory -) - -set(No-Target-RESULT 1) -set(No-Target-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Target.cmake:1 \\(get_property\\):.*get_property not given name for TARGET scope\\..*") - -check_cmake_test(GetProperty - No-Target -) - -set(Bad-Target-RESULT 1) -set(Bad-Target-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Target.cmake:1 \\(get_property\\):.*get_property could not find TARGET FOO\\..*") - -check_cmake_test(GetProperty - Bad-Target -) - -set(No-Source-RESULT 1) -set(No-Source-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Source.cmake:1 \\(get_property\\):.*get_property not given name for SOURCE scope\\..*") - -check_cmake_test(GetProperty - No-Source -) - -set(No-Test-RESULT 1) -set(No-Test-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Test.cmake:1 \\(get_property\\):.*get_property not given name for TEST scope\\..*") - -check_cmake_test(GetProperty - No-Test -) - -set(Bad-Test-RESULT 1) -set(Bad-Test-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Test.cmake:1 \\(get_property\\):.*get_property given TEST name that does not exist: FOO.*") - -check_cmake_test(GetProperty - Bad-Test -) - -set(Variable-Name-RESULT 1) -set(Variable-Name-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Variable-Name.cmake:1 \\(get_property\\):.*get_property given name for VARIABLE scope\\..*") - -check_cmake_test(GetProperty - Variable-Name -) - -set(No-Cache-RESULT 1) -set(No-Cache-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Cache.cmake:1 \\(get_property\\):.*get_property not given name for CACHE scope\\..*") - -check_cmake_test(GetProperty - No-Cache -) |