Files
CMake/Tests/RunCMake/TargetObjects/NoTarget.cmake
Brad King ac0cf7ff4f Genex: Reject TARGET_OBJECTS on non-object libraries earlier
Move the diagnostic that rejects the TARGET_OBJECTS generator expression
in non-buildsystem context until after the check for whether the named
target is an object library.  This order will makes more sense than the
previous order once TARGET_OBJECTS is allowed in non-buildsystem
context.
2017-04-18 10:29:36 -04:00

8 lines
307 B
CMake

add_library(iface INTERFACE)
target_sources(iface INTERFACE $<TARGET_OBJECTS:NoTarget>)
file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:NoTarget>)
file(GENERATE OUTPUT test_output2 CONTENT $<TARGET_PROPERTY:iface,INTERFACE_SOURCES>)
install(FILES $<TARGET_OBJECTS:NoTarget> DESTINATION objects)