mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 17:19:05 -05:00
Relax the usage of TARGET_OBJECTS generator expression
The geneator expression can now be used with static, shared, and module libraries and executables.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user