diff options
author | Brad King <brad.king@kitware.com> | 2019-02-25 13:00:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-25 13:02:07 (GMT) |
commit | 94970cd042963bedd4594d867802880b13fa9f69 (patch) | |
tree | d5e73d5905f0148b10c86649293a9c85f3b6830d /Source/cmMakefile.cxx | |
parent | ac419931eed3e62cc69762a2a8b8dd76192999c0 (diff) | |
parent | 9dd255548d0a82994da71c3667f3b6668de50ffd (diff) | |
download | CMake-94970cd042963bedd4594d867802880b13fa9f69.zip CMake-94970cd042963bedd4594d867802880b13fa9f69.tar.gz CMake-94970cd042963bedd4594d867802880b13fa9f69.tar.bz2 |
Merge topic 'error-consolidate'
9dd255548d cmSystemTools::Error: consolidate parameters into single std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2995
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0a0501b..f66999f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -959,9 +959,8 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput( if (file && file->GetCustomCommand() && !replace) { // The rule file already exists. if (commandLines != file->GetCustomCommand()->GetCommandLines()) { - cmSystemTools::Error("Attempt to add a custom rule to output \"", - outName.c_str(), - "\" which already has a custom rule."); + cmSystemTools::Error("Attempt to add a custom rule to output \"" + + outName + "\" which already has a custom rule."); } return file; } @@ -1101,8 +1100,8 @@ void cmMakefile::AddCustomCommandOldStyle( ti->second.AddSource(sf->GetFullPath()); } else { cmSystemTools::Error("Attempt to add a custom rule to a target " - "that does not exist yet for target ", - target.c_str()); + "that does not exist yet for target " + + target); return; } } @@ -1189,8 +1188,7 @@ cmTarget* cmMakefile::AddUtilityCommand( if (sf) { sf->SetProperty("SYMBOLIC", "1"); } else { - cmSystemTools::Error("Could not get source file entry for ", - force.c_str()); + cmSystemTools::Error("Could not get source file entry for " + force); } // Always create the byproduct sources and mark them generated. @@ -2445,8 +2443,9 @@ const std::string& cmMakefile::GetRequiredDefinition( const std::string* def = GetDef(name); if (!def) { cmSystemTools::Error("Error required internal CMake variable not " - "set, cmake may not be built correctly.\n", - "Missing variable is:\n", name.c_str()); + "set, cmake may not be built correctly.\n" + "Missing variable is:\n" + + name); return empty; } return *def; @@ -3779,15 +3778,15 @@ int cmMakefile::ConfigureFile(const std::string& infile, tempOutputFile += ".tmp"; cmsys::ofstream fout(tempOutputFile.c_str(), omode); if (!fout) { - cmSystemTools::Error("Could not open file for write in copy operation ", - tempOutputFile.c_str()); + cmSystemTools::Error("Could not open file for write in copy operation " + + tempOutputFile); cmSystemTools::ReportLastSystemError(""); return 0; } cmsys::ifstream fin(sinfile.c_str()); if (!fin) { - cmSystemTools::Error("Could not open file for read in copy operation ", - sinfile.c_str()); + cmSystemTools::Error("Could not open file for read in copy operation " + + sinfile); return 0; } |