summaryrefslogtreecommitdiffstats
path: root/Tests/ObjectLibrary
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-04-03 18:42:35 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-04-19 17:52:50 (GMT)
commitce078dda79df1c8d9f142e45d2fa3cf971a09594 (patch)
treeea3941cabdb1df8f5dbefc29223f9f2bfc1e8d8d /Tests/ObjectLibrary
parent3e129d71bc12a325c0548aaaea24470cd172470b (diff)
downloadCMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.zip
CMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.tar.gz
CMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.tar.bz2
Relax the usage of TARGET_OBJECTS generator expression
The geneator expression can now be used with static, shared, and module libraries and executables.
Diffstat (limited to 'Tests/ObjectLibrary')
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 4bffd12..7897ab9 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -62,4 +62,14 @@ add_custom_target(UseABinternalDep COMMAND ${CMAKE_COMMAND} -E touch UseABintern
add_custom_command(TARGET UseABinternal POST_BUILD COMMAND ${CMAKE_COMMAND} -P UseABinternalDep.cmake)
add_dependencies(UseABinternal UseABinternalDep)
+# Test a static library with sources from a different static library
+add_library(UseCstaticObjs STATIC $<TARGET_OBJECTS:Cstatic> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:Bexport>)
+
+# Test a shared library with sources from a different shared library
+add_library(UseCsharedObjs SHARED $<TARGET_OBJECTS:Cshared> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:Bexport>)
+
+# Test a shared executable with sources from a different shared library
+add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
+target_link_libraries(UseABstaticObjs ABstatic)
+
add_subdirectory(ExportLanguages)