summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-24 22:36:27 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:38 (GMT)
commit1a1b737c99ac0bd0d555fde2fadf77f08516a4ea (patch)
tree552432238277036e6d3f846d87276db507cb949d /Source/cmake.cxx
parent24b5e93de2c753e94cae3b41c1ca7cddaa03e5e7 (diff)
downloadCMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.zip
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.gz
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.bz2
stringapi: Use strings for generator names
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 13572f4..abe27a5 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -965,7 +965,7 @@ int cmake::AddCMakePaths()
return 1;
}
-void cmake::AddExtraGenerator(const char* name,
+void cmake::AddExtraGenerator(const std::string& name,
CreateExtraGeneratorFunctionType newFunction)
{
cmExternalMakefileProjectGenerator* extraGenerator = newFunction();
@@ -1034,9 +1034,10 @@ void cmake::GetRegisteredGenerators(std::vector<std::string>& names)
}
}
-cmGlobalGenerator* cmake::CreateGlobalGenerator(const char* name)
+cmGlobalGenerator* cmake::CreateGlobalGenerator(const std::string& gname)
{
cmExternalMakefileProjectGenerator* extraGenerator = 0;
+ std::string name = gname;
RegisteredExtraGeneratorsMap::const_iterator extraGenIt =
this->ExtraGenerators.find(name);
if (extraGenIt != this->ExtraGenerators.end())
@@ -1324,7 +1325,8 @@ int cmake::ActualConfigure()
if(genName)
{
std::string fullName = cmExternalMakefileProjectGenerator::
- CreateFullGeneratorName(genName, extraGenName);
+ CreateFullGeneratorName(genName,
+ extraGenName ? extraGenName : "");
this->GlobalGenerator = this->CreateGlobalGenerator(fullName.c_str());
}
if(this->GlobalGenerator)
@@ -1417,13 +1419,13 @@ int cmake::ActualConfigure()
if(!this->CacheManager->GetCacheValue("CMAKE_GENERATOR"))
{
this->CacheManager->AddCacheEntry("CMAKE_GENERATOR",
- this->GlobalGenerator->GetName(),
+ this->GlobalGenerator->GetName().c_str(),
"Name of generator.",
cmCacheManager::INTERNAL);
this->CacheManager->AddCacheEntry("CMAKE_EXTRA_GENERATOR",
- this->GlobalGenerator->GetExtraGeneratorName(),
- "Name of external makefile project generator.",
- cmCacheManager::INTERNAL);
+ this->GlobalGenerator->GetExtraGeneratorName().c_str(),
+ "Name of external makefile project generator.",
+ cmCacheManager::INTERNAL);
}
if(const char* tsName =