mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-26 18:58:34 -06:00
stringapi: Return a string reference for the configuration
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user