diff options
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 903bcec..6ee2c14 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -533,6 +533,21 @@ void cmGeneratorTarget::AddTracedSources(std::vector<std::string> const& srcs) } } +void cmGeneratorTarget::AddIncludeDirectory(const std::string& src, + bool before) +{ + this->Target->InsertInclude(src, this->Makefile->GetBacktrace(), before); + cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); + cmGeneratorExpression ge(lfbt); + CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(src); + cge->SetEvaluateForBuildsystem(true); + // Insert before begin/end + std::vector<TargetPropertyEntry*>::iterator pos = before + ? this->IncludeDirectoriesEntries.begin() + : this->IncludeDirectoriesEntries.end(); + this->IncludeDirectoriesEntries.insert(pos, new TargetPropertyEntry(cge)); +} + std::vector<cmSourceFile*> const* cmGeneratorTarget::GetSourceDepends( cmSourceFile const* sf) const { |