summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-10 16:16:08 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-12-10 16:58:36 (GMT)
commit97fae68b81d7dbb5dda9fe21f860863bcc0c7183 (patch)
treee42aa63347e642769757e9e8901a757fcbb06506 /Source/cmComputeTargetDepends.cxx
parent330af68ed4eca375160b31aefd71bd6ea11b586f (diff)
downloadCMake-97fae68b81d7dbb5dda9fe21f860863bcc0c7183.zip
CMake-97fae68b81d7dbb5dda9fe21f860863bcc0c7183.tar.gz
CMake-97fae68b81d7dbb5dda9fe21f860863bcc0c7183.tar.bz2
Remove INTERFACE build targets.
Commit b04f3b9a (Create make rules for INTERFACE_LIBRARY targets., 2013-08-21) extended the makefile generator to create build targets for INTERFACE_LIBRARY targets. No other generators were extended with this feature. This conflicts with the feature of whitelisting of target properties read from INTERFACE_LIBRARY targets. The INTERFACE_* properties of the INTERFACE_LIBRARY may legitimately contain TARGET_PROPERTY generator expressions for reading properties from the 'head target'. The 'head target' would be the INTERFACE_LIBRARY itself when creating the build rules for it, which means that non-whitelisted properties would be read.
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r--Source/cmComputeTargetDepends.cxx25
1 files changed, 7 insertions, 18 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index cb9e37e..02fd173 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -199,6 +199,10 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
{
// Get the depender.
cmTarget* depender = this->Targets[depender_index];
+ if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
+ {
+ return;
+ }
// Loop over all targets linked directly in all configs.
// We need to make targets depend on the union of all config-specific
@@ -208,15 +212,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
std::set<cmStdString> emitted;
{
std::vector<std::string> tlibs;
- if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- // For INTERFACE_LIBRARY depend on the interface instead.
- depender->GetInterfaceLinkLibraries(0, tlibs, depender);
- }
- else
- {
- depender->GetDirectLinkLibraries(0, tlibs, depender);
- }
+ depender->GetDirectLinkLibraries(0, tlibs, depender);
// A target should not depend on itself.
emitted.insert(depender->GetName());
for(std::vector<std::string>::const_iterator lib = tlibs.begin();
@@ -237,15 +233,8 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
it != configs.end(); ++it)
{
std::vector<std::string> tlibs;
- if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- // For INTERFACE_LIBRARY depend on the interface instead.
- depender->GetInterfaceLinkLibraries(it->c_str(), tlibs, depender);
- }
- else
- {
- depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
- }
+ depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
+
// A target should not depend on itself.
emitted.insert(depender->GetName());
for(std::vector<std::string>::const_iterator lib = tlibs.begin();