diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 23:04:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 14:03:50 (GMT) |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmInstallCommand.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-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/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 94d2091..0041122 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -99,7 +99,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args, // Unknown mode. std::string e = "called with unknown mode "; e += args[0]; - this->SetError(e.c_str()); + this->SetError(e); return false; } @@ -269,7 +269,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) // Unknown argument. cmOStringStream e; e << "TARGETS given unknown argument \"" << unknownArgs[0] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -370,7 +370,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given target \"" << (*targetIt) << "\" which is an alias."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } // Lookup this target in the current directory. @@ -387,7 +387,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given target \"" << (*targetIt) << "\" which is not an executable, library, or module."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } else if(target->GetType() == cmTarget::OBJECT_LIBRARY) @@ -395,7 +395,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given OBJECT library \"" << (*targetIt) << "\" which may not be installed."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } // Store the target in the list to be installed. @@ -407,7 +407,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given target \"" << (*targetIt) << "\" which does not exist in this directory."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -499,7 +499,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no FRAMEWORK DESTINATION for shared library " "FRAMEWORK target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -519,7 +519,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no LIBRARY DESTINATION for shared library " "target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -539,7 +539,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no ARCHIVE DESTINATION for static library " "target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -560,7 +560,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no LIBRARY DESTINATION for module target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -595,7 +595,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE " "executable target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -612,7 +612,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) cmOStringStream e; e << "TARGETS given no RUNTIME DESTINATION for executable " "target \"" << target.GetName() << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -851,7 +851,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args) // Unknown argument. cmOStringStream e; e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -866,7 +866,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args) // The rename option works only with one file. cmOStringStream e; e << args[0] << " given RENAME option with more than one file."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -886,7 +886,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args) // A destination is required. cmOStringStream e; e << args[0] << " given no DESTINATION!"; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -927,7 +927,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -941,7 +941,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -969,7 +969,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" before a PATTERN or REGEX is given."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } literal_args += " EXCLUDE"; @@ -982,7 +982,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" before a PATTERN or REGEX is given."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -997,7 +997,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1011,7 +1011,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1025,7 +1025,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1040,7 +1040,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1055,7 +1055,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1069,7 +1069,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1094,7 +1094,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " given non-directory \"" << args[i] << "\" to install."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1150,7 +1150,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " given invalid file permission \"" << args[i] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1162,7 +1162,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " given invalid directory permission \"" << args[i] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1174,7 +1174,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " given invalid permission \"" << args[i] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1183,7 +1183,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) // Unknown argument. cmOStringStream e; e << args[0] << " given unknown argument \"" << args[i] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1204,7 +1204,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) // A destination is required. cmOStringStream e; e << args[0] << " given no DESTINATION!"; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1247,7 +1247,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) // Unknown argument. cmOStringStream e; e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1262,7 +1262,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) // A destination is required. cmOStringStream e; e << args[0] << " given no DESTINATION!"; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1274,7 +1274,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) e << args[0] << " given invalid export file name \"" << fname << "\". " << "The FILE argument may not contain a path. " << "Specify the path in the DESTINATION argument."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1285,7 +1285,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) cmOStringStream e; e << args[0] << " given invalid export file name \"" << fname << "\". " << "The FILE argument must specify a name ending in \".cmake\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -1302,7 +1302,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) << "This name cannot be safely converted to a file name. " << "Specify a different export name or use the FILE option to set " << "a file name explicitly."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1327,7 +1327,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) << "EXPORT_LINK_INTERFACE_LIBRARIES" << "\", but target \"" << te->Target->GetName() << "\" does not have policy CMP0022 set to NEW."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -1368,7 +1368,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, { cmOStringStream e; e << modeName << " given directory \"" << (*fileIt) << "\" to install."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } // Store the file for installation. |