diff options
author | David Cole <david.cole@kitware.com> | 2008-06-19 15:08:08 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2008-06-19 15:08:08 (GMT) |
commit | fd413f2ab8b5be8bef7ce4db04f4863b77759e0c (patch) | |
tree | 32b08122b4b1d5dfe0d109a731eca29ce7a7c528 /Tests | |
parent | 01a93bbb3e46242f7ddeb56ce52f1fe539d14296 (diff) | |
download | CMake-fd413f2ab8b5be8bef7ce4db04f4863b77759e0c.zip CMake-fd413f2ab8b5be8bef7ce4db04f4863b77759e0c.tar.gz CMake-fd413f2ab8b5be8bef7ce4db04f4863b77759e0c.tar.bz2 |
BUG: Avoid running the new CPackComponents test on Windows unless the NSIS installer is available.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 74bbc07..febb46a 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -287,7 +287,27 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel "-DSTAGE2:BOOL=1" --test-command ${SimpleInstallInstallDir}/MyTest/bin/SimpleInstExeS2) - IF(CTEST_TEST_CPACK) + # By default, run the CPackComponents test if the CTEST_TEST_CPACK + # option is ON: + # + set(CTEST_RUN_CPackComponents ${CTEST_TEST_CPACK}) + + # But on Windows, only run the CPackComponents test if the NSIS + # installer builder is available: + # + if(WIN32) + find_program(NSIS_MAKENSIS_EXECUTABLE NAMES makensis + PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS] + DOC "makensis.exe location" + ) + if(NSIS_MAKENSIS_EXECUTABLE) + set(CTEST_RUN_CPackComponents ON) + else(NSIS_MAKENSIS_EXECUTABLE) + set(CTEST_RUN_CPackComponents OFF) + endif(NSIS_MAKENSIS_EXECUTABLE) + endif(WIN32) + + IF(CTEST_RUN_CPackComponents) ADD_TEST(CPackComponents ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/CPackComponents" @@ -300,7 +320,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel --test-command ${CMAKE_CMAKE_COMMAND} "-DCPackComponents_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackComponents" -P "${CMake_SOURCE_DIR}/Tests/CPackComponents/VerifyResult.cmake") - ENDIF(CTEST_TEST_CPACK) + ENDIF(CTEST_RUN_CPackComponents) ADD_TEST(X11 ${CMAKE_CTEST_COMMAND} --build-and-test |