diff options
author | Brad King <brad.king@kitware.com> | 2017-04-26 20:17:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-26 20:23:12 (GMT) |
commit | f4c23ee244768bc53f2e77d20a1d19b13cfd37cb (patch) | |
tree | 5c24cdf314c0a053d2a1319f0ef65d363ee691ce /Tests | |
parent | d272c4d5f7c3090855683d517e987934bd7fe176 (diff) | |
download | CMake-f4c23ee244768bc53f2e77d20a1d19b13cfd37cb.zip CMake-f4c23ee244768bc53f2e77d20a1d19b13cfd37cb.tar.gz CMake-f4c23ee244768bc53f2e77d20a1d19b13cfd37cb.tar.bz2 |
Tests: Add case for install(FILES) with TARGET_OBJECTS
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/install/obj1.c | 4 | ||||
-rw-r--r-- | Tests/RunCMake/install/obj2.c | 4 |
5 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake b/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake new file mode 100644 index 0000000..f7f2a3a --- /dev/null +++ b/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake @@ -0,0 +1 @@ +check_installed([[^objs;objs/obj1(\.c)?\.(o|obj);objs/obj2(\.c)?\.(o|obj)$]]) diff --git a/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake b/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake new file mode 100644 index 0000000..40c58ad --- /dev/null +++ b/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_library(objs OBJECT obj1.c obj2.c) +install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index e5d709b..1a60f0c 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -60,6 +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) diff --git a/Tests/RunCMake/install/obj1.c b/Tests/RunCMake/install/obj1.c new file mode 100644 index 0000000..2411aab --- /dev/null +++ b/Tests/RunCMake/install/obj1.c @@ -0,0 +1,4 @@ +int obj1(void) +{ + return 0; +} diff --git a/Tests/RunCMake/install/obj2.c b/Tests/RunCMake/install/obj2.c new file mode 100644 index 0000000..2dad71e --- /dev/null +++ b/Tests/RunCMake/install/obj2.c @@ -0,0 +1,4 @@ +int obj2(void) +{ + return 0; +} |