summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-17 14:44:22 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-17 14:44:22 -0500
commit70ffd71db1dff3973f93edb9a6120cec0023f89f (patch)
tree843450d10f6d779f491f1a574a3f94f1560d1d8f /Tests
parentf408667d1926167fcafbd4f4f16d117a5dbd2823 (diff)
parent29533380ea887e3f5eab44260bbd77933cf91ca9 (diff)
downloadcmake-70ffd71db1dff3973f93edb9a6120cec0023f89f.tar.gz
Merge topic 'test-RunCMake-updates'
29533380 Tests: Allow RunCMake expected result code to be a regex a85ee8b8 Tests: Simplify RunCMake test extra argument passing da7155f5 Tests: Allow RunCMake tests to pass generator expressions
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/RunCMake.cmake2
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 2bfd4d6e39..e74eadde1e 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -1,7 +1,7 @@
# See adjacent README.rst for documentation of this test infrastructure.
macro(add_RunCMake_test test)
- add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND}
+ add_test(NAME RunCMake.${test} COMMAND ${CMAKE_CMAKE_COMMAND}
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}
-DRunCMake_GENERATOR=${CMAKE_GENERATOR}
-DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
@@ -9,6 +9,7 @@ macro(add_RunCMake_test test)
-DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test}
-DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test}
${${test}_ARGS}
+ ${ARGN}
-P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/RunCMakeTest.cmake"
)
endmacro()
@@ -131,8 +132,7 @@ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
add_RunCMake_test(IncompatibleQt)
endif()
if (QT4_FOUND)
- set(ObsoleteQtMacros_ARGS -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
- add_RunCMake_test(ObsoleteQtMacros)
+ add_RunCMake_test(ObsoleteQtMacros -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
endif()
find_package(PkgConfig QUIET)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 56d69c846b..7b1a5b2a85 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -65,7 +65,7 @@ function(run_cmake test)
)
endif()
set(msg "")
- if(NOT "${actual_result}" STREQUAL "${expect_result}")
+ if(NOT "${actual_result}" MATCHES "${expect_result}")
set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n")
endif()
foreach(o out err)