diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2017-12-15 10:00:52 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@sap.com> | 2018-01-23 09:24:47 (GMT) |
commit | 3f935e690a337a7a692c30d4d14082e08d1bed7c (patch) | |
tree | 737bdc0cc2a6eb04366e84ebfd2d48f7fdde68d9 /Source/cmLocalGenerator.h | |
parent | 2c6f5baaa7e101cdd3e5769a3fd8d49d0501b8e6 (diff) | |
download | CMake-3f935e690a337a7a692c30d4d14082e08d1bed7c.zip CMake-3f935e690a337a7a692c30d4d14082e08d1bed7c.tar.gz CMake-3f935e690a337a7a692c30d4d14082e08d1bed7c.tar.bz2 |
LocalGenerator: refactoring
Introduce method AppendCompileOptions to support
future source file property COMPILE_OPTIONS.
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r-- | Source/cmLocalGenerator.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 4a7d2ca..b993967 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -118,10 +118,11 @@ public: cmGeneratorTarget const* target, const std::string& lang); ///! Append flags to a string. - virtual void AppendFlags(std::string& flags, const std::string& newFlags); - virtual void AppendFlags(std::string& flags, const char* newFlags); + virtual void AppendFlags(std::string& flags, + const std::string& newFlags) const; + virtual void AppendFlags(std::string& flags, const char* newFlags) const; virtual void AppendFlagEscape(std::string& flags, - const std::string& rawFlag); + const std::string& rawFlag) const; void AppendIPOLinkerFlags(std::string& flags, cmGeneratorTarget* target, const std::string& config, const std::string& lang); @@ -166,6 +167,22 @@ public: const std::vector<std::string>& defines_vec) const; /** + * Encode a list of compile options for the compiler + * command line. + */ + void AppendCompileOptions(std::string& options, const char* options_list, + const char* regex = nullptr) const; + void AppendCompileOptions(std::string& options, + std::string const& options_list, + const char* regex = nullptr) const + { + this->AppendCompileOptions(options, options_list.c_str(), regex); + } + void AppendCompileOptions(std::string& options, + const std::vector<std::string>& options_vec, + const char* regex = nullptr) const; + + /** * Join a set of defines into a definesString with a space separator. */ void JoinDefines(const std::set<std::string>& defines, |