summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-19 14:57:04 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-19 14:57:04 (GMT)
commit6a85d624a8d5e48080785d5aacd48badc4d41d99 (patch)
treed480622f4b7dbd240d5e3ff4a448a3e6e0b401eb /Source
parentaee06336b86eb2a21c2773cd50470d7fac2dbba6 (diff)
parent2600e923a66a86784f756c7d5b9a8b06c5848576 (diff)
downloadCMake-6a85d624a8d5e48080785d5aacd48badc4d41d99.zip
CMake-6a85d624a8d5e48080785d5aacd48badc4d41d99.tar.gz
CMake-6a85d624a8d5e48080785d5aacd48badc4d41d99.tar.bz2
Merge branch 'add_custom_command-no-INTERFACE-lib' into release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx3
-rw-r--r--Source/cmMakefile.cxx8
2 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index aca195c..7890379 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -263,7 +263,8 @@ void cmLocalGenerator::TraceDependencies()
for(cmGeneratorTargetsType::iterator t = targets.begin();
t != targets.end(); ++t)
{
- if (t->second->Target->IsImported())
+ if (t->second->Target->IsImported()
+ || t->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f248c57..10137ec 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -926,6 +926,14 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
this->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
}
+ if(ti->second.GetType() == cmTarget::INTERFACE_LIBRARY)
+ {
+ cmOStringStream e;
+ e << "Target \"" << target << "\" is an INTERFACE library "
+ "that may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands.";
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return;
+ }
// Add the command to the appropriate build step for the target.
std::vector<std::string> no_output;
cmCustomCommand cc(this, no_output, depends,