Tests: Add case for install(FILES) with TARGET_OBJECTS

This commit is contained in:
Brad King
2017-04-26 16:17:46 -04:00
parent d272c4d5f7
commit f4c23ee244
5 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1 @@
check_installed([[^objs;objs/obj1(\.c)?\.(o|obj);objs/obj2(\.c)?\.(o|obj)$]])

View File

@@ -0,0 +1,3 @@
enable_language(C)
add_library(objs OBJECT obj1.c obj2.c)
install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs)

View File

@@ -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)

View File

@@ -0,0 +1,4 @@
int obj1(void)
{
return 0;
}

View File

@@ -0,0 +1,4 @@
int obj2(void)
{
return 0;
}