summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-25 14:11:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-04 10:28:56 (GMT)
commit6db7e6d24c68085f16dcf6d8a86ae0f74e9a1f01 (patch)
tree33cc0619cacca931691c3a7643f00d2ea262b281 /Source
parent0bb3ca2874dee912e39d41c81ab2079f4a82c765 (diff)
downloadCMake-6db7e6d24c68085f16dcf6d8a86ae0f74e9a1f01.zip
CMake-6db7e6d24c68085f16dcf6d8a86ae0f74e9a1f01.tar.gz
CMake-6db7e6d24c68085f16dcf6d8a86ae0f74e9a1f01.tar.bz2
add_dependencies: Disallow use with INTERFACE_LIBRARY.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddDependenciesCommand.cxx9
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)