diff options
Diffstat (limited to 'Source/cmAddDependenciesCommand.cxx')
-rw-r--r-- | Source/cmAddDependenciesCommand.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index e4d7f7f..87bfb3c 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -33,6 +33,15 @@ bool cmAddDependenciesCommand } if(cmTarget* target = this->Makefile->FindTargetToUse(target_name.c_str())) { + if (target->GetType() == cmTarget::INTERFACE_LIBRARY) + { + cmOStringStream e; + e << "Cannot add target-level dependencies to INTERFACE library " + "target \"" << target_name << "\".\n"; + this->SetError(e.str().c_str()); + return false; + } + std::vector<std::string>::const_iterator s = args.begin(); ++s; // skip over target_name for (; s != args.end(); ++s) |