summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.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/cmExtraSublimeTextGenerator.cxx
parent24b5e93de2c753e94cae3b41c1ca7cddaa03e5e7 (diff)
downloadCMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.zip
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.gz
CMake-1a1b737c99ac0bd0d555fde2fadf77f08516a4ea.tar.bz2
stringapi: Use strings for generator names
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 03c7c92..f973a84 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -41,7 +41,7 @@ http://sublimetext.info/docs/en/reference/build_systems.html
//----------------------------------------------------------------------------
void cmExtraSublimeTextGenerator
-::GetDocumentation(cmDocumentationEntry& entry, const char*) const
+::GetDocumentation(cmDocumentationEntry& entry, const std::string&) const
{
entry.Name = this->GetName();
entry.Brief = "Generates Sublime Text 2 project files.";
@@ -290,7 +290,7 @@ void cmExtraSublimeTextGenerator::
// Ninja uses ninja.build files (look for a way to get the output file name
// from cmMakefile or something)
std::string makefileName;
- if (strcmp(this->GlobalGenerator->GetName(), "Ninja")==0)
+ if (this->GlobalGenerator->GetName() == "Ninja")
{
makefileName = "build.ninja";
}
@@ -320,7 +320,8 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand(
{
std::string command = "\"";
command += make + "\"";
- if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
+ std::string generator = this->GlobalGenerator->GetName();
+ if (generator == "NMake Makefiles")
{
std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
command += ", \"/NOLOGO\", \"/f\", \"";
@@ -329,7 +330,7 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand(
command += target;
command += "\"";
}
- else if (strcmp(this->GlobalGenerator->GetName(), "Ninja")==0)
+ else if (generator == "Ninja")
{
std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
command += ", \"-f\", \"";
@@ -341,7 +342,7 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand(
else
{
std::string makefileName;
- if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
+ if (generator == "MinGW Makefiles")
{
// no escaping of spaces in this case, see
// http://public.kitware.com/Bug/view.php?id=10014