summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-31 18:02:03 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-31 18:08:39 (GMT)
commit29410df23d4783de9d90a6d8c24cf7c9c5aacc80 (patch)
tree871332bfcc4a3d54f15ee84eb2e73f70dae4c7e4 /Source
parent0a5fe2793a385034d3a676d2dc4cef3122e9bbea (diff)
downloadCMake-29410df23d4783de9d90a6d8c24cf7c9c5aacc80.zip
CMake-29410df23d4783de9d90a6d8c24cf7c9c5aacc80.tar.gz
CMake-29410df23d4783de9d90a6d8c24cf7c9c5aacc80.tar.bz2
cmIDEOptions: Add an AppendFlag method to update multi-valued options
Diffstat (limited to 'Source')
-rw-r--r--Source/cmIDEOptions.cxx7
-rw-r--r--Source/cmIDEOptions.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index dfbece7..72bd593 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -196,6 +196,13 @@ void cmIDEOptions::AddFlag(const char* flag,
}
//----------------------------------------------------------------------------
+void cmIDEOptions::AppendFlag(std::string const& flag,
+ std::string const& value)
+{
+ this->FlagMap[flag].push_back(value);
+}
+
+//----------------------------------------------------------------------------
void cmIDEOptions::RemoveFlag(const char* flag)
{
this->FlagMap.erase(flag);
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index 313c003..9b60f80 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -30,6 +30,7 @@ public:
void AddDefines(const std::vector<std::string> &defines);
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 RemoveFlag(const char* flag);
const char* GetFlag(const char* flag);