diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c63de79..c47147c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -264,7 +264,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 58625fb..ad9de60 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -926,6 +926,14 @@ cmMakefile::AddCustomCommandToTarget(const std::string& 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, |