mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 11:49:55 -06:00
cmIDEOptions: Add HasFlag method to test if a flag is set
This commit is contained in:
@@ -216,6 +216,12 @@ void cmIDEOptions::RemoveFlag(const char* flag)
|
||||
this->FlagMap.erase(flag);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmIDEOptions::HasFlag(std::string const& flag) const
|
||||
{
|
||||
return this->FlagMap.find(flag) != this->FlagMap.end();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmIDEOptions::GetFlag(const char* flag)
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user