diff options
author | Brad King <brad.king@kitware.com> | 2008-07-03 18:38:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-07-03 18:38:57 (GMT) |
commit | f58a1370cd6cbcfdc1cf6855441b9ad085e7ff14 (patch) | |
tree | 4211f15c28d06d3a88c1ff566e4e8c74e2287afd | |
parent | 56f1e0b9c24b5bb807446adcd155aa54fc9e2cef (diff) | |
download | CMake-f58a1370cd6cbcfdc1cf6855441b9ad085e7ff14.zip CMake-f58a1370cd6cbcfdc1cf6855441b9ad085e7ff14.tar.gz CMake-f58a1370cd6cbcfdc1cf6855441b9ad085e7ff14.tar.bz2 |
ENH: Remove condition on use of CMake 2.4 commands
- Commands SET_TESTS_PROPERTIES and GET_TEST_PROPERTY exist
in CMake 2.4, which is now required.
- Therefore we need not check before using them.
-rw-r--r-- | Tests/CMakeLists.txt | 69 |
1 files changed, 30 insertions, 39 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c233254..c262194 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -139,9 +139,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel ") ADD_TEST(NightlyCMakeBuild /bin/sh ${CMake_BINARY_DIR}/Tests/CMake-CVS/nightly-cmake.sh) - IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) - SET_TESTS_PROPERTIES ( NightlyCMakeBuild PROPERTIES TIMEOUT 3500) - ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) + SET_TESTS_PROPERTIES ( NightlyCMakeBuild PROPERTIES TIMEOUT 3500) ENDIF(CMAKE_BUILD_NIGHTLY_WINDOWS_TEST) @@ -581,14 +579,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel --build-project LinkLineOrder --test-command Exec2 ) - IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) - SET_TESTS_PROPERTIES ( qtwrapping PROPERTIES DEPENDS wrapping) - SET_TESTS_PROPERTIES ( testdriver1 PROPERTIES DEPENDS qtwrapping) - SET_TESTS_PROPERTIES ( testdriver2 PROPERTIES DEPENDS testdriver1) - SET_TESTS_PROPERTIES ( testdriver3 PROPERTIES DEPENDS testdriver2) - SET_TESTS_PROPERTIES ( linkorder2 PROPERTIES DEPENDS linkorder1) - SET_TESTS_PROPERTIES ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall) - ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) + SET_TESTS_PROPERTIES ( qtwrapping PROPERTIES DEPENDS wrapping) + SET_TESTS_PROPERTIES ( testdriver1 PROPERTIES DEPENDS qtwrapping) + SET_TESTS_PROPERTIES ( testdriver2 PROPERTIES DEPENDS testdriver1) + SET_TESTS_PROPERTIES ( testdriver3 PROPERTIES DEPENDS testdriver2) + SET_TESTS_PROPERTIES ( linkorder2 PROPERTIES DEPENDS linkorder1) + SET_TESTS_PROPERTIES ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall) IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR) ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND} @@ -734,26 +730,24 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel --output-log "${CMake_BINARY_DIR}/Tests/CTestTest3/testOutput.log" ) # these tests take a long time, make sure they have it - IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) - # if timeouts have not already been set - GET_TEST_PROPERTY(CTestTest TIMEOUT PREVIOUS_TIMEOUT) - IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - SET_TESTS_PROPERTIES ( CTestTest - PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - - GET_TEST_PROPERTY(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT) - IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - SET_TESTS_PROPERTIES ( CTestTest2 - PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - - GET_TEST_PROPERTY(CTestTest3 TIMEOUT PREVIOUS_TIMEOUT) - IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - SET_TESTS_PROPERTIES ( CTestTest3 - PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) + # if timeouts have not already been set + GET_TEST_PROPERTY(CTestTest TIMEOUT PREVIOUS_TIMEOUT) + IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + SET_TESTS_PROPERTIES ( CTestTest + PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) + ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + + GET_TEST_PROPERTY(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT) + IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + SET_TESTS_PROPERTIES ( CTestTest2 + PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) + ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + + GET_TEST_PROPERTY(CTestTest3 TIMEOUT PREVIOUS_TIMEOUT) + IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + SET_TESTS_PROPERTIES ( CTestTest3 + PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) + ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS) IF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode) @@ -778,14 +772,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel ${CMake_BINARY_DIR}/Tests/BootstrapTest/Bootstrap.cmk/cmake) # provide more time for the bootstrap test - IF (COMMAND GET_TEST_PROPERTY) - GET_TEST_PROPERTY(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT) - IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - SET_TESTS_PROPERTIES ( BootstrapTest - PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - ENDIF (COMMAND GET_TEST_PROPERTY) - + GET_TEST_PROPERTY(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT) + IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + SET_TESTS_PROPERTIES ( BootstrapTest + PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) + ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) ENDIF(UNIX AND CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST) # fortran does not work for IDE builds because |