diff options
Diffstat (limited to 'Source/cmTryRunCommand.cxx')
-rw-r--r-- | Source/cmTryRunCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 42fcc3c..c57aabd 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -101,11 +101,11 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv, bool captureRunOutput = false; if (!this->OutputVariable.empty()) { captureRunOutput = true; - tryCompile.push_back("OUTPUT_VARIABLE"); + tryCompile.emplace_back("OUTPUT_VARIABLE"); tryCompile.push_back(this->OutputVariable); } if (!this->CompileOutputVariable.empty()) { - tryCompile.push_back("OUTPUT_VARIABLE"); + tryCompile.emplace_back("OUTPUT_VARIABLE"); tryCompile.push_back(this->CompileOutputVariable); } if (!this->RunOutputVariable.empty()) { @@ -121,7 +121,7 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv, // now try running the command if it compiled if (!res) { if (this->OutputFile.empty()) { - cmSystemTools::Error(this->FindErrorMessage.c_str()); + cmSystemTools::Error(this->FindErrorMessage); } else { // "run" it and capture the output std::string runOutputContents; @@ -354,7 +354,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, errorMessage += " " + internalRunOutputName + " (advanced)\n"; } errorMessage += detailsString; - cmSystemTools::Error(errorMessage.c_str()); + cmSystemTools::Error(errorMessage); return; } |