From a20d2c85d02842a23ef1105daa078a821172cb4e Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Tue, 3 Sep 2019 10:25:44 -0700 Subject: cmLocalGenerator: Add AppendFlags overload with backtraces --- Source/cmLocalGenerator.cxx | 8 ++++++++ Source/cmLocalGenerator.h | 2 ++ Source/cmLocalUnixMakefileGenerator3.h | 1 + 3 files changed, 11 insertions(+) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 042c108..144d995 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2138,6 +2138,14 @@ void cmLocalGenerator::AppendFlags(std::string& flags, } } +void cmLocalGenerator::AppendFlags( + std::string& flags, const std::vector>& newFlags) const +{ + for (BT const& flag : newFlags) { + this->AppendFlags(flags, flag.Value); + } +} + void cmLocalGenerator::AppendFlagEscape(std::string& flags, const std::string& rawFlag) const { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e6ba333..3c4e897 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -121,6 +121,8 @@ public: //! Append flags to a string. virtual void AppendFlags(std::string& flags, const std::string& newFlags) const; + virtual void AppendFlags(std::string& flags, + const std::vector>& newFlags) const; virtual void AppendFlagEscape(std::string& flags, const std::string& rawFlag) const; void AddPchDependencies(cmGeneratorTarget* target, diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 745e251..c02c0dc 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -90,6 +90,7 @@ public: // append flags to a string void AppendFlags(std::string& flags, const std::string& newFlags) const override; + using cmLocalCommonGenerator::AppendFlags; // append an echo command enum EchoColor -- cgit v0.12