diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-12-01 17:15:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-12-07 13:24:00 (GMT) |
commit | 8f47a5f16aa685e15e6b49c0b90a58b18ea38d0a (patch) | |
tree | a8476a57b461bc1b74b89bf09dd9417ac0c6162c /Source/cmGeneratorTarget.cxx | |
parent | 057ac11bfbc5501c8037b173a73a55466163774d (diff) | |
download | CMake-8f47a5f16aa685e15e6b49c0b90a58b18ea38d0a.zip CMake-8f47a5f16aa685e15e6b49c0b90a58b18ea38d0a.tar.gz CMake-8f47a5f16aa685e15e6b49c0b90a58b18ea38d0a.tar.bz2 |
cmGeneratorTarget: Add AddIncludeDirectory method (experimental)
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 { |