cmLocalGenerator: Constify some cmTarget and cmGeneratorTarget arguments

This commit is contained in:
Geoff Viola 2015-03-29 20:56:21 -06:00 committed by Brad King
parent f3be6c1b9b
commit 051d8be17f
2 changed files with 13 additions and 10 deletions

View File

@ -2004,7 +2004,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalGenerator::AddArchitectureFlags(std::string& flags, void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
cmGeneratorTarget* target, cmGeneratorTarget const* target,
const std::string& lang, const std::string& lang,
const std::string& config) const std::string& config)
{ {
@ -2191,7 +2191,7 @@ void cmLocalGenerator::AddSharedFlags(std::string& flags,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalGenerator:: void cmLocalGenerator::
AddCompilerRequirementFlag(std::string &flags, cmTarget* target, AddCompilerRequirementFlag(std::string &flags, cmTarget const* target,
const std::string& lang) const std::string& lang)
{ {
if (lang.empty()) if (lang.empty())
@ -2313,7 +2313,8 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
} }
} }
static void AddVisibilityCompileOption(std::string &flags, cmTarget* target, static void AddVisibilityCompileOption(std::string &flags,
cmTarget const* target,
cmLocalGenerator *lg, cmLocalGenerator *lg,
const std::string& lang) const std::string& lang)
{ {
@ -2347,7 +2348,7 @@ static void AddVisibilityCompileOption(std::string &flags, cmTarget* target,
} }
static void AddInlineVisibilityCompileOption(std::string &flags, static void AddInlineVisibilityCompileOption(std::string &flags,
cmTarget* target, cmTarget const* target,
cmLocalGenerator *lg) cmLocalGenerator *lg)
{ {
std::string compileOption std::string compileOption
@ -2368,7 +2369,7 @@ static void AddInlineVisibilityCompileOption(std::string &flags,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalGenerator void cmLocalGenerator
::AddVisibilityPresetFlags(std::string &flags, cmTarget* target, ::AddVisibilityPresetFlags(std::string &flags, cmTarget const* target,
const std::string& lang) const std::string& lang)
{ {
int targetType = target->GetType(); int targetType = target->GetType();
@ -2394,7 +2395,8 @@ void cmLocalGenerator
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalGenerator::AddCMP0018Flags(std::string &flags, cmTarget* target, void cmLocalGenerator::AddCMP0018Flags(std::string &flags,
cmTarget const* target,
std::string const& lang, std::string const& lang,
const std::string& config) const std::string& config)
{ {

View File

@ -138,18 +138,19 @@ public:
std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; } std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; }
void AddArchitectureFlags(std::string& flags, cmGeneratorTarget* target, void AddArchitectureFlags(std::string& flags,
cmGeneratorTarget const* target,
const std::string&lang, const std::string& config); const std::string&lang, const std::string& config);
void AddLanguageFlags(std::string& flags, const std::string& lang, void AddLanguageFlags(std::string& flags, const std::string& lang,
const std::string& config); const std::string& config);
void AddCMP0018Flags(std::string &flags, cmTarget* target, void AddCMP0018Flags(std::string &flags, cmTarget const* target,
std::string const& lang, const std::string& config); std::string const& lang, const std::string& config);
void AddVisibilityPresetFlags(std::string &flags, cmTarget* target, void AddVisibilityPresetFlags(std::string &flags, cmTarget const* target,
const std::string& lang); const std::string& lang);
void AddConfigVariableFlags(std::string& flags, const std::string& var, void AddConfigVariableFlags(std::string& flags, const std::string& var,
const std::string& config); const std::string& config);
void AddCompilerRequirementFlag(std::string &flags, cmTarget* target, void AddCompilerRequirementFlag(std::string &flags, cmTarget const* target,
const std::string& lang); const std::string& lang);
///! Append flags to a string. ///! Append flags to a string.
virtual void AppendFlags(std::string& flags, const std::string& newFlags); virtual void AppendFlags(std::string& flags, const std::string& newFlags);