diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2019-09-03 17:25:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-10 14:45:41 (GMT) |
commit | 291c83f063d310f700e3e1afa756dcdf968d0f09 (patch) | |
tree | 763aa1f96b6d4e7dad4e8e2542673300b7716503 /Source/cmLocalGenerator.cxx | |
parent | 8e973b8e8d6542b5dd15173884bde68a9a390949 (diff) | |
download | CMake-291c83f063d310f700e3e1afa756dcdf968d0f09.zip CMake-291c83f063d310f700e3e1afa756dcdf968d0f09.tar.gz CMake-291c83f063d310f700e3e1afa756dcdf968d0f09.tar.bz2 |
cmLocalGenerator: Add GetTargetCompileFlags overload with backtraces
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b73f5d2..bc1ff1f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1382,6 +1382,16 @@ void cmLocalGenerator::GetTargetCompileFlags(cmGeneratorTarget* target, std::string const& lang, std::string& flags) { + std::vector<BT<std::string>> tmpFlags = + this->GetTargetCompileFlags(target, config, lang); + this->AppendFlags(flags, tmpFlags); +} + +std::vector<BT<std::string>> cmLocalGenerator::GetTargetCompileFlags( + cmGeneratorTarget* target, std::string const& config, + std::string const& lang) +{ + std::vector<BT<std::string>> flags; std::string compileFlags; cmMakefile* mf = this->GetMakefile(); @@ -1406,9 +1416,11 @@ void cmLocalGenerator::GetTargetCompileFlags(cmGeneratorTarget* target, this->AppendFlags(compileFlags, this->GetFrameworkFlags(lang, config, target)); - flags = std::move(compileFlags); - + if (!compileFlags.empty()) { + flags.emplace_back(std::move(compileFlags)); + } this->AddCompileOptions(flags, target, lang, config); + return flags; } static std::string GetFrameworkFlags(const std::string& lang, |