diff options
Diffstat (limited to 'Source/cmIDEOptions.h')
-rw-r--r-- | Source/cmIDEOptions.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index e7749ec..313c003 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -29,6 +29,7 @@ public: void AddDefines(const char* defines); 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 RemoveFlag(const char* flag); const char* GetFlag(const char* flag); @@ -40,7 +41,23 @@ protected: // Then parse the command line flags specified in CMAKE_CXX_FLAGS // and CMAKE_C_FLAGS // and overwrite or add new values to this map - std::map<std::string, std::string> FlagMap; + class FlagValue: public std::vector<std::string> + { + typedef std::vector<std::string> derived; + public: + FlagValue& operator=(std::string const& r) + { + this->resize(1); + this->operator[](0) = r; + return *this; + } + FlagValue& operator=(std::vector<std::string> const& r) + { + this->derived::operator=(r); + return *this; + } + }; + std::map<std::string, FlagValue > FlagMap; // Preprocessor definitions. std::vector<std::string> Defines; |