diff options
author | Brad King <brad.king@kitware.com> | 2013-10-15 13:32:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-15 13:32:12 (GMT) |
commit | 29b1e591152dc56c03ae2b6d6721d5b1c297505a (patch) | |
tree | cd715dfb1e04272ae4c1d421c1ac7910f3feb7db /Tests | |
parent | 08dc9720efff8cb3e11d615a4eda76286880bd01 (diff) | |
parent | 920ffbf50fa08e9a8bc4cdef5fd58ab7a6c6130c (diff) | |
download | CMake-29b1e591152dc56c03ae2b6d6721d5b1c297505a.zip CMake-29b1e591152dc56c03ae2b6d6721d5b1c297505a.tar.gz CMake-29b1e591152dc56c03ae2b6d6721d5b1c297505a.tar.bz2 |
Merge topic 'bump-required-cmake-version'
920ffbf Require CMake 2.8.4 or greater to build CMake
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 37 |
2 files changed, 11 insertions, 28 deletions
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index a831e30..070c9cc 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMakeLib_TESTS testXMLSafe ) -if(WIN32 AND NOT UNIX) # Just if(WIN32) when CMake >= 2.8.4 is required +if(WIN32) list(APPEND CMakeLib_TESTS testVisualStudioSlnParser ) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f7b98da..0e0455c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1985,12 +1985,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "Process file.*foo.py.*Total LOC:.*13.*Percentage Coverage: 84.62.*" ENVIRONMENT COVFILE=) - # Use macro, not function so that build can still be driven by CMake 2.4. - # After 2.6 is required, this could be a function without the extra 'set' - # calls. - # - macro(add_config_tests cfg) - set(cfg "${cfg}") + function(add_config_tests cfg) set(base "${CMake_BINARY_DIR}/Tests/CTestConfig") # Test -S script with a -C config arg to ctest: @@ -2014,7 +2009,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ add_test(CTestConfig.Dashboard.${cfg} ${CMAKE_CMAKE_COMMAND} -P "${base}/${cfg}-dashboard.cmake" -VV ) - endmacro() + endfunction() add_config_tests(Debug) add_config_tests(MinSizeRel) @@ -2165,15 +2160,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set_tests_properties(CTestTestTimeout PROPERTIES PASS_REGULAR_EXPRESSION "TestTimeout *\\.+ *\\*\\*\\*Timeout.*CheckChild *\\.+ *Passed") - # this test only runs correctly if WORKING_DIRECTORY is honored. - if (NOT CMAKE_VERSION VERSION_LESS "2.8.4") - add_test( - NAME CTestTestRerunFailed - COMMAND ${CMAKE_CTEST_COMMAND} --rerun-failed) - set_tests_properties(CTestTestRerunFailed PROPERTIES - PASS_REGULAR_EXPRESSION "1/1 Test #1: TestTimeout" DEPENDS CTestTestTimeout - WORKING_DIRECTORY ${CMake_BINARY_DIR}/Tests/CTestTestTimeout) - endif () + add_test( + NAME CTestTestRerunFailed + COMMAND ${CMAKE_CTEST_COMMAND} --rerun-failed) + set_tests_properties(CTestTestRerunFailed PROPERTIES + PASS_REGULAR_EXPRESSION "1/1 Test #1: TestTimeout" DEPENDS CTestTestTimeout + WORKING_DIRECTORY ${CMake_BINARY_DIR}/Tests/CTestTestTimeout) configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestZeroTimeout/test.cmake.in" @@ -2234,20 +2226,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/testOutput.log" ) - # Use macro, not function so that build can still be driven by CMake 2.4. - # After 2.6 is required, this could be a function without the extra 'set' - # calls. - # - macro(add_failed_submit_test name source build in out log regex) - # Have variables named source, build and drop_method because the - # configure_file call expects those variables to be defined. - # - set(source "${source}") - set(build "${build}") + function(add_failed_submit_test name source build in out log regex) configure_file("${in}" "${out}" @ONLY) add_test(${name} ${CMAKE_CTEST_COMMAND} -S "${out}" -V --output-log "${log}") set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${regex}") - endmacro() + endfunction() set(regex "(Problems when submitting via S*CP") set(regex "${regex}|Error message was: ") |