diff options
author | Brad King <brad.king@kitware.com> | 2016-06-10 13:23:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-10 13:24:11 (GMT) |
commit | 853b1bb4ba176e886e3682a2475f1de1932ee890 (patch) | |
tree | a7886bb44dd82937cb56fe755c9d1fce4c09c6b3 /Source | |
parent | 98aafb2ad64daa0617b3a71ec61f692d5aa205ce (diff) | |
download | CMake-853b1bb4ba176e886e3682a2475f1de1932ee890.zip CMake-853b1bb4ba176e886e3682a2475f1de1932ee890.tar.gz CMake-853b1bb4ba176e886e3682a2475f1de1932ee890.tar.bz2 |
cmLocalGenerator: Constify AppendDefines and AddCompileDefinitions
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f543ec4..3f957f0 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -943,7 +943,7 @@ std::string cmLocalGenerator::GetIncludeFlags( void cmLocalGenerator::AddCompileDefinitions(std::set<std::string>& defines, cmGeneratorTarget const* target, const std::string& config, - const std::string& lang) + const std::string& lang) const { std::vector<std::string> targetDefines; target->GetCompileDefinitions(targetDefines, config, lang); @@ -2051,7 +2051,7 @@ void cmLocalGenerator::AppendFlagEscape(std::string& flags, } void cmLocalGenerator::AppendDefines(std::set<std::string>& defines, - const char* defines_list) + const char* defines_list) const { // Short-circuit if there are no definitions. if (!defines_list) { @@ -2065,7 +2065,8 @@ void cmLocalGenerator::AppendDefines(std::set<std::string>& defines, } void cmLocalGenerator::AppendDefines( - std::set<std::string>& defines, const std::vector<std::string>& defines_vec) + std::set<std::string>& defines, + const std::vector<std::string>& defines_vec) const { for (std::vector<std::string>::const_iterator di = defines_vec.begin(); di != defines_vec.end(); ++di) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index ac2ebce..ad77c1f 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -138,13 +138,15 @@ public: * Encode a list of preprocessor definitions for the compiler * command line. */ - void AppendDefines(std::set<std::string>& defines, const char* defines_list); - void AppendDefines(std::set<std::string>& defines, std::string defines_list) + void AppendDefines(std::set<std::string>& defines, + const char* defines_list) const; + void AppendDefines(std::set<std::string>& defines, + std::string defines_list) const { this->AppendDefines(defines, defines_list.c_str()); } void AppendDefines(std::set<std::string>& defines, - const std::vector<std::string>& defines_vec); + const std::vector<std::string>& defines_vec) const; /** * Join a set of defines into a definesString with a space separator. @@ -200,7 +202,7 @@ public: void AddCompileDefinitions(std::set<std::string>& defines, cmGeneratorTarget const* target, const std::string& config, - const std::string& lang); + const std::string& lang) const; std::string GetProjectName() const; |