diff options
author | Brad King <brad.king@kitware.com> | 2017-04-26 20:16:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-26 20:16:04 (GMT) |
commit | d272c4d5f7c3090855683d517e987934bd7fe176 (patch) | |
tree | cab25ddbe1f7d00e839f4cc43339b4275c16a092 /Tests | |
parent | 41b84b2220ef147d76f5b1291601c069397f854b (diff) | |
download | CMake-d272c4d5f7c3090855683d517e987934bd7fe176.zip CMake-d272c4d5f7c3090855683d517e987934bd7fe176.tar.gz CMake-d272c4d5f7c3090855683d517e987934bd7fe176.tar.bz2 |
Tests: Generalize RunCMake.install internal infrastructure
Allow `run_install_test` to be used for simpler cases.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 45693b5..e5d709b 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -13,12 +13,15 @@ function(run_install_test case) # Check "all" components. set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all) run_cmake_command(${case}-all ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -P cmake_install.cmake) - # Check unspecified component. - set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-uns) - run_cmake_command(${case}-uns ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=Unspecified -P cmake_install.cmake) - # Check explicit component. - set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-exc) - run_cmake_command(${case}-exc ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=exc -P cmake_install.cmake) + + if(run_install_test_components) + # Check unspecified component. + set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-uns) + run_cmake_command(${case}-uns ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=Unspecified -P cmake_install.cmake) + # Check explicit component. + set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-exc) + run_cmake_command(${case}-exc ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=exc -P cmake_install.cmake) + endif() endfunction() # Function called in *-check.cmake scripts to check installed files. @@ -57,5 +60,6 @@ run_cmake(CMP0062-OLD) run_cmake(CMP0062-NEW) run_cmake(CMP0062-WARN) +set(run_install_test_components 1) run_install_test(FILES-EXCLUDE_FROM_ALL) run_install_test(TARGETS-EXCLUDE_FROM_ALL) |