diff options
author | Brad King <brad.king@kitware.com> | 2017-04-18 14:05:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-18 14:29:36 (GMT) |
commit | ac0cf7ff4f5a846381593cf28ebbc9cfaf107149 (patch) | |
tree | c87e38b9518483b9f7d7fbab681a38d6927a7998 /Tests/RunCMake/TargetObjects/NoTarget.cmake | |
parent | 8577978c580d09abc56fa39f387a3991c91c31ba (diff) | |
download | CMake-ac0cf7ff4f5a846381593cf28ebbc9cfaf107149.zip CMake-ac0cf7ff4f5a846381593cf28ebbc9cfaf107149.tar.gz CMake-ac0cf7ff4f5a846381593cf28ebbc9cfaf107149.tar.bz2 |
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.
Diffstat (limited to 'Tests/RunCMake/TargetObjects/NoTarget.cmake')
-rw-r--r-- | Tests/RunCMake/TargetObjects/NoTarget.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetObjects/NoTarget.cmake b/Tests/RunCMake/TargetObjects/NoTarget.cmake new file mode 100644 index 0000000..5d7e33e --- /dev/null +++ b/Tests/RunCMake/TargetObjects/NoTarget.cmake @@ -0,0 +1,7 @@ +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) |