Commit acb116e3 authored by Ben Boeckel's avatar Ben Boeckel Committed by Brad King
Browse files

stringapi: Return a string reference for the configuration

parent 84fdc992
......@@ -55,8 +55,8 @@ public:
const cmake* GetCMakeInstance() const;
cmake* GetCMakeInstance();
const char* GetConfigName() const
{ return this->ConfigName.c_str(); }
std::string const& GetConfigName() const
{ return this->ConfigName; }
/// @return whether we are processing the top CMakeLists.txt file.
bool isRootMakefile() const;
......
......@@ -91,7 +91,7 @@ cmGlobalNinjaGenerator* cmNinjaTargetGenerator::GetGlobalGenerator() const
return this->LocalGenerator->GetGlobalNinjaGenerator();
}
const char* cmNinjaTargetGenerator::GetConfigName() const
std::string const& cmNinjaTargetGenerator::GetConfigName() const
{
return this->LocalGenerator->GetConfigName();
}
......
......@@ -65,7 +65,7 @@ protected:
cmMakefile* GetMakefile() const
{ return this->Makefile; }
const char* GetConfigName() const;
std::string const& GetConfigName() const;
std::string LanguageCompilerRule(const std::string& lang) const
{ return lang + "_COMPILER"; }
......
......@@ -76,7 +76,7 @@ public:
* final name (but could be). Otherwise the returned name is the
* final name.
*/
const char* GetName() const { return this->Name.c_str(); }
const std::string& GetName() const { return this->Name; }
/**
* Get the cmMakefile instance for which the source file was created.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment