summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddDependenciesCommand.cxx9
-rw-r--r--Source/cmComputeTargetDepends.cxx6
2 files changed, 4 insertions, 11 deletions
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx
index b560452..3a74946 100644
--- a/Source/cmAddDependenciesCommand.cxx
+++ b/Source/cmAddDependenciesCommand.cxx
@@ -33,15 +33,6 @@ bool cmAddDependenciesCommand
}
if(cmTarget* target = this->Makefile->FindTargetToUse(target_name))
{
- if (target->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- std::ostringstream e;
- e << "Cannot add target-level dependencies to INTERFACE library "
- "target \"" << target_name << "\".\n";
- this->SetError(e.str());
- return false;
- }
-
std::vector<std::string>::const_iterator s = args.begin();
++s; // skip over target_name
for (; s != args.end(); ++s)
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index cf2b88e..bbffd5d 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -418,9 +418,11 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmTarget const* dependee,
bool linking)
{
- if(dependee->IsImported())
+ if(dependee->IsImported() ||
+ dependee->GetType() == cmTarget::INTERFACE_LIBRARY)
{
- // Skip imported targets but follow their utility dependencies.
+ // Skip IMPORTED and INTERFACE targets but follow their utility
+ // dependencies.
std::set<cmLinkItem> const& utils = dependee->GetUtilityItems();
for(std::set<cmLinkItem>::const_iterator i = utils.begin();
i != utils.end(); ++i)