From 841001028a579bea093482fc3c1beb5d45f2b2d6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Aug 2014 13:39:35 -0400 Subject: cmIDEOptions: Add an AppendFlag overload to append multiple values --- Source/cmIDEOptions.cxx | 8 ++++++++ Source/cmIDEOptions.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 72bd593..e9980cf 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -203,6 +203,14 @@ void cmIDEOptions::AppendFlag(std::string const& flag, } //---------------------------------------------------------------------------- +void cmIDEOptions::AppendFlag(std::string const& flag, + std::vector const& value) +{ + FlagValue& fv = this->FlagMap[flag]; + std::copy(value.begin(), value.end(), std::back_inserter(fv)); +} + +//---------------------------------------------------------------------------- void cmIDEOptions::RemoveFlag(const char* flag) { this->FlagMap.erase(flag); diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 9b60f80..2bedbad 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -31,6 +31,8 @@ public: void AddFlag(const char* flag, const char* value); void AddFlag(const char* flag, std::vector const& value); void AppendFlag(std::string const& flag, std::string const& value); + void AppendFlag(std::string const& flag, + std::vector const& value); void RemoveFlag(const char* flag); const char* GetFlag(const char* flag); -- cgit v0.12