diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-26 20:29:05 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-11-26 21:16:15 (GMT) |
commit | 672f1001c015bf5f531d8731dba30a5fb856edea (patch) | |
tree | c7c953213a32cfd2da7773bf250afd2844079c1a /Tests/InterfaceLibrary | |
parent | d2f2a2e226a8717d6fdb6df0ed4858d1629f557c (diff) | |
download | CMake-672f1001c015bf5f531d8731dba30a5fb856edea.zip CMake-672f1001c015bf5f531d8731dba30a5fb856edea.tar.gz CMake-672f1001c015bf5f531d8731dba30a5fb856edea.tar.bz2 |
Genex: Fix evaluation context propagation for TARGET_OBJECTS.
Extract a new method to encapsulate the requirements of evaluating
dependent-expressions, namely, propagation of the
EvaluateForBuildsystem setting, which is missing from the
getLinkedTargetsContent implementation.
Commit v3.1.0-rc1~688^2 (Genex: Only evaluate TARGET_OBJECTS to determine
target sources., 2014-03-20) introduced an error case for use of
TARGET_OBJECTS outside of the context of generating the buildsystem,
as the path to object files may be dependent on buildsystem
variables (See bug #15226).
Commit v3.1.0-rc1~314^2 (Allow INTERFACE_SOURCES to specify
$<TARGET_OBJECTS> (#14970), 2014-07-09) made it possible to
propagate such content to dependent targets.
While that commit propagated the EvaluateForBuildsystem setting
for the case of a TARGET_PROPERTY expression, as generated for
direct dependencies of a target in
cmTargetInternals::AddInterfaceEntries, it did not add propagation
for content from further transitive target dependencies, as determined
by getLinkedTargetsContent.
Diffstat (limited to 'Tests/InterfaceLibrary')
-rw-r--r-- | Tests/InterfaceLibrary/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index fe202dd..ee81419 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -22,8 +22,11 @@ add_library(objlib OBJECT obj.cpp) add_library(iface_objlib INTERFACE) target_sources(iface_objlib INTERFACE $<TARGET_OBJECTS:objlib>) +add_library(intermediate INTERFACE) +target_link_libraries(intermediate INTERFACE iface_objlib) + add_executable(InterfaceLibrary definetestexe.cpp) -target_link_libraries(InterfaceLibrary iface_nodepends headeriface subiface iface_objlib) +target_link_libraries(InterfaceLibrary iface_nodepends headeriface subiface intermediate) add_subdirectory(libsdir) |