diff options
author | Brad King <brad.king@kitware.com> | 2018-06-19 15:50:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-06-19 15:50:51 (GMT) |
commit | 00a9d133fb2838ebb756d684659c5d51f577ede3 (patch) | |
tree | 9935bd2cff743a49d1c5def1a36f227e45a7d04c /Tests | |
parent | c3fbe69a34ef908dd57c0b6db99fe41c0c66d26a (diff) | |
parent | e89ad0f94e6b52cc9f75abe21107c7a2e5d24ca2 (diff) | |
download | CMake-00a9d133fb2838ebb756d684659c5d51f577ede3.zip CMake-00a9d133fb2838ebb756d684659c5d51f577ede3.tar.gz CMake-00a9d133fb2838ebb756d684659c5d51f577ede3.tar.bz2 |
Merge topic 'install_from_another_directory'
e89ad0f94e install: Allow installing targets created in another directory
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2152
Diffstat (limited to 'Tests')
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index f0c02d8..b1add3a 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -72,6 +72,8 @@ if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES} run_install_test(FILES-TARGET_OBJECTS) endif() +run_install_test(TARGETS-InstallFromSubDir) + set(run_install_test_components 1) run_install_test(FILES-EXCLUDE_FROM_ALL) run_install_test(TARGETS-EXCLUDE_FROM_ALL) diff --git a/Tests/RunCMake/install/TARGETS-InstallFromSubDir-all-check.cmake b/Tests/RunCMake/install/TARGETS-InstallFromSubDir-all-check.cmake new file mode 100644 index 0000000..1d747c3 --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-InstallFromSubDir-all-check.cmake @@ -0,0 +1 @@ +check_installed([[^bin;bin/myexe(\.exe)?;bin/subexe(\.exe)?$]]) diff --git a/Tests/RunCMake/install/TARGETS-InstallFromSubDir.cmake b/Tests/RunCMake/install/TARGETS-InstallFromSubDir.cmake new file mode 100644 index 0000000..8615d6e --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-InstallFromSubDir.cmake @@ -0,0 +1,4 @@ +enable_language(C) +add_executable(myexe main.c) +add_subdirectory(TARGETS-InstallFromSubDir) +install(TARGETS myexe subexe DESTINATION bin) diff --git a/Tests/RunCMake/install/TARGETS-InstallFromSubDir/CMakeLists.txt b/Tests/RunCMake/install/TARGETS-InstallFromSubDir/CMakeLists.txt new file mode 100644 index 0000000..477d938 --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-InstallFromSubDir/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(subexe ../main.c) |