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.
This commit is contained in:
Brad King 2008-07-03 14:38:57 -04:00
parent 56f1e0b9c2
commit f58a1370cd
1 changed files with 28 additions and 37 deletions

View File

@ -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)
# 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(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)
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