diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmIDEOptions.cxx | 6 | ||||
-rw-r--r-- | Source/cmIDEOptions.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index e9980cf..0eb903d 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -217,6 +217,12 @@ void cmIDEOptions::RemoveFlag(const char* flag) } //---------------------------------------------------------------------------- +bool cmIDEOptions::HasFlag(std::string const& flag) const +{ + return this->FlagMap.find(flag) != this->FlagMap.end(); +} + +//---------------------------------------------------------------------------- const char* cmIDEOptions::GetFlag(const char* flag) { // This method works only for single-valued flags! diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 2bedbad..7386016 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -34,6 +34,7 @@ public: void AppendFlag(std::string const& flag, std::vector<std::string> const& value); void RemoveFlag(const char* flag); + bool HasFlag(std::string const& flag) const; const char* GetFlag(const char* flag); protected: |