diff options
Diffstat (limited to 'Source/cmExecuteProcessCommand.cxx')
-rw-r--r-- | Source/cmExecuteProcessCommand.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 994c1707bb..40f70b8c73 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; } |