summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-27 13:03:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-27 13:03:09 (GMT)
commit6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203 (patch)
tree9181fc427c833159812be6778e31dd20bc9014d6 /Tests/RunCMake/install/RunCMakeTest.cmake
parent7402bd38714e7930810f6bd61e20b836268be814 (diff)
parentf4c23ee244768bc53f2e77d20a1d19b13cfd37cb (diff)
downloadCMake-6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203.zip
CMake-6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203.tar.gz
CMake-6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203.tar.bz2
Merge topic 'test-install-objects-as-files'
f4c23ee2 Tests: Add case for install(FILES) with TARGET_OBJECTS d272c4d5 Tests: Generalize RunCMake.install internal infrastructure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !769
Diffstat (limited to 'Tests/RunCMake/install/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake20
1 files changed, 14 insertions, 6 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 45693b5..1a60f0c 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,10 @@ run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW)
run_cmake(CMP0062-WARN)
+if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
+ run_install_test(FILES-TARGET_OBJECTS)
+endif()
+
+set(run_install_test_components 1)
run_install_test(FILES-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-EXCLUDE_FROM_ALL)