summaryrefslogtreecommitdiffstats
path: root/Source/cmExecuteProcessCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-10 23:04:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-11 14:03:50 (GMT)
commit21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch)
tree8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmExecuteProcessCommand.cxx
parente21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff)
downloadCMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
Diffstat (limited to 'Source/cmExecuteProcessCommand.cxx')
-rw-r--r--Source/cmExecuteProcessCommand.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 994c170..40f70b8 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -191,7 +191,7 @@ bool cmExecuteProcessCommand
{
cmOStringStream e;
e << " given unknown argument \"" << args[i] << "\".";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
}
@@ -200,7 +200,7 @@ bool cmExecuteProcessCommand
{
std::string e = "attempted to output into a file: " + output_file
+ " into a source directory.";
- this->SetError(e.c_str());
+ this->SetError(e);
cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -326,12 +326,12 @@ bool cmExecuteProcessCommand
// Store the output obtained.
if(!output_variable.empty() && tempOutput.size())
{
- this->Makefile->AddDefinition(output_variable.c_str(),
+ this->Makefile->AddDefinition(output_variable,
&*tempOutput.begin());
}
if(!merge_output && !error_variable.empty() && tempError.size())
{
- this->Makefile->AddDefinition(error_variable.c_str(),
+ this->Makefile->AddDefinition(error_variable,
&*tempError.begin());
}
@@ -345,19 +345,19 @@ bool cmExecuteProcessCommand
int v = cmsysProcess_GetExitValue(cp);
char buf[100];
sprintf(buf, "%d", v);
- this->Makefile->AddDefinition(result_variable.c_str(), buf);
+ this->Makefile->AddDefinition(result_variable, buf);
}
break;
case cmsysProcess_State_Exception:
- this->Makefile->AddDefinition(result_variable.c_str(),
+ this->Makefile->AddDefinition(result_variable,
cmsysProcess_GetExceptionString(cp));
break;
case cmsysProcess_State_Error:
- this->Makefile->AddDefinition(result_variable.c_str(),
+ this->Makefile->AddDefinition(result_variable,
cmsysProcess_GetErrorString(cp));
break;
case cmsysProcess_State_Expired:
- this->Makefile->AddDefinition(result_variable.c_str(),
+ this->Makefile->AddDefinition(result_variable,
"Process terminated due to timeout");
break;
}