summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-08-13 17:39:35 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-13 17:42:49 (GMT)
commit841001028a579bea093482fc3c1beb5d45f2b2d6 (patch)
tree073e5b4db542d2e1a3fe93806b5e3723b297c6b2 /Source
parent5891b36640aaf95b53441870d95d90d4aaeb1971 (diff)
downloadCMake-841001028a579bea093482fc3c1beb5d45f2b2d6.zip
CMake-841001028a579bea093482fc3c1beb5d45f2b2d6.tar.gz
CMake-841001028a579bea093482fc3c1beb5d45f2b2d6.tar.bz2
cmIDEOptions: Add an AppendFlag overload to append multiple values
Diffstat (limited to 'Source')
-rw-r--r--Source/cmIDEOptions.cxx8
-rw-r--r--Source/cmIDEOptions.h2
2 files changed, 10 insertions, 0 deletions
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<std::string> 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<std::string> const& value);
void AppendFlag(std::string const& flag, std::string const& value);
+ void AppendFlag(std::string const& flag,
+ std::vector<std::string> const& value);
void RemoveFlag(const char* flag);
const char* GetFlag(const char* flag);