a272344228
In cmTarget, cmGeneratorTarget, and cmGeneratorExpressionEvaluator, fix target name lookups to occur in the cmMakefile context of the target that referenced the name, not the current 'head' target. The context matters for imported targets because they are directory-scoped instead of globally unique. We already do this in cmComputeLinkDepends and cmComputeTargetDepends. Extend the InterfaceLibrary test with an example covering this behavior.
9 lines
431 B
CMake
9 lines
431 B
CMake
add_library(imp::iface INTERFACE IMPORTED)
|
|
set_property(TARGET imp::iface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP)
|
|
set_property(TARGET imp::iface PROPERTY INTERFACE_SOMEPROP ON)
|
|
set_property(TARGET imp::iface PROPERTY INTERFACE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sub.cpp)
|
|
|
|
add_library(subiface INTERFACE)
|
|
target_link_libraries(subiface INTERFACE imp::iface)
|
|
set_property(TARGET subiface PROPERTY INTERFACE_SOMEPROP ON)
|