summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx4
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx2
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx2
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.cxx2
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx18
-rw-r--r--Source/CPack/cmCPackGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackProductBuildGenerator.cxx4
9 files changed, 24 insertions, 24 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index cf8334a..180c92e 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -90,7 +90,7 @@ int cmCPackIFWGenerator::PackageFiles()
ifwCmd.c_str(), &output, &output, &retVal, nullptr,
this->GeneratorVerbose, cmDuration::zero());
if (!res || retVal) {
- cmGeneratedFileStream ofs(ifwTmpFile.c_str());
+ cmGeneratedFileStream ofs(ifwTmpFile);
ofs << "# Run command: " << ifwCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
@@ -203,7 +203,7 @@ int cmCPackIFWGenerator::PackageFiles()
ifwCmd.c_str(), &output, &output, &retVal, nullptr,
this->GeneratorVerbose, cmDuration::zero());
if (!res || retVal) {
- cmGeneratedFileStream ofs(ifwTmpFile.c_str());
+ cmGeneratedFileStream ofs(ifwTmpFile);
ofs << "# Run command: " << ifwCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 36cf08c..8f492af 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -306,7 +306,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
}
// Output stream
- cmGeneratedFileStream fout((this->Directory + "/config/config.xml").data());
+ cmGeneratedFileStream fout(this->Directory + "/config/config.xml");
cmXMLWriter xout(fout);
xout.StartDocument();
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index f24ab69..67e279c 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -528,7 +528,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
}
// Output stream
- cmGeneratedFileStream fout((this->Directory + "/meta/package.xml").data());
+ cmGeneratedFileStream fout(this->Directory + "/meta/package.xml");
cmXMLWriter xout(fout);
xout.StartDocument();
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx
index a01fc4e..987cad8 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.cxx
+++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx
@@ -183,7 +183,7 @@ bool cmCPackIFWRepository::PatchUpdatesXml()
this->Directory + "/repository/UpdatesPatch.xml";
// Output stream
- cmGeneratedFileStream fout(updatesPatchXml.data());
+ cmGeneratedFileStream fout(updatesPatchXml);
cmXMLWriter xout(fout);
xout.StartDocument();
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 593b4bf..ee1070f 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -103,7 +103,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
*/
#define DECLARE_AND_OPEN_ARCHIVE(filename, archive) \
cmGeneratedFileStream gf; \
- gf.Open((filename).c_str(), false, true); \
+ gf.Open((filename), false, true); \
if (!GenerateHeader(&gf)) { \
cmCPackLogger(cmCPackLog::LOG_ERROR, \
"Problem to generate Header for archive <" \
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index c53dd32..972fe6f 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -238,7 +238,7 @@ int cmCPackDebGenerator::createDeb()
const std::string strGenWDIR(this->GetOption("GEN_WDIR"));
const std::string dbfilename = strGenWDIR + "/debian-binary";
{ // the scope is needed for cmGeneratedFileStream
- cmGeneratedFileStream out(dbfilename.c_str());
+ cmGeneratedFileStream out(dbfilename);
out << "2.0";
out << std::endl; // required for valid debian package
}
@@ -287,7 +287,7 @@ int cmCPackDebGenerator::createDeb()
this->GetOption("GEN_CPACK_DEBIAN_PACKAGE_SOURCE");
{ // the scope is needed for cmGeneratedFileStream
- cmGeneratedFileStream out(ctlfilename.c_str());
+ cmGeneratedFileStream out(ctlfilename);
out << "Package: " << debian_pkg_name << "\n";
out << "Version: " << debian_pkg_version << "\n";
out << "Section: " << debian_pkg_section << "\n";
@@ -347,7 +347,7 @@ int cmCPackDebGenerator::createDeb()
const bool gen_shibs = this->IsOn("CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS") &&
debian_pkg_shlibs && *debian_pkg_shlibs;
if (gen_shibs) {
- cmGeneratedFileStream out(shlibsfilename.c_str());
+ cmGeneratedFileStream out(shlibsfilename);
out << debian_pkg_shlibs;
out << std::endl;
}
@@ -355,7 +355,7 @@ int cmCPackDebGenerator::createDeb()
const std::string postinst = strGenWDIR + "/postinst";
const std::string postrm = strGenWDIR + "/postrm";
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTINST")) {
- cmGeneratedFileStream out(postinst.c_str());
+ cmGeneratedFileStream out(postinst);
out << "#!/bin/sh\n\n"
"set -e\n\n"
"if [ \"$1\" = \"configure\" ]; then\n"
@@ -363,7 +363,7 @@ int cmCPackDebGenerator::createDeb()
"fi\n";
}
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTRM")) {
- cmGeneratedFileStream out(postrm.c_str());
+ cmGeneratedFileStream out(postrm);
out << "#!/bin/sh\n\n"
"set -e\n\n"
"if [ \"$1\" = \"remove\" ]; then\n"
@@ -412,7 +412,7 @@ int cmCPackDebGenerator::createDeb()
// atomic file generation for data.tar
{
cmGeneratedFileStream fileStream_data_tar;
- fileStream_data_tar.Open(filename_data_tar.c_str(), false, true);
+ fileStream_data_tar.Open(filename_data_tar, false, true);
if (!fileStream_data_tar) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error opening the file \""
@@ -493,7 +493,7 @@ int cmCPackDebGenerator::createDeb()
std::string md5filename = strGenWDIR + "/md5sums";
{
// the scope is needed for cmGeneratedFileStream
- cmGeneratedFileStream out(md5filename.c_str());
+ cmGeneratedFileStream out(md5filename);
std::string topLevelWithTrailingSlash =
this->GetOption("CPACK_TEMPORARY_DIRECTORY");
@@ -528,7 +528,7 @@ int cmCPackDebGenerator::createDeb()
// atomic file generation for control.tar
{
cmGeneratedFileStream fileStream_control_tar;
- fileStream_control_tar.Open(filename_control_tar.c_str(), false, true);
+ fileStream_control_tar.Open(filename_control_tar, false, true);
if (!fileStream_control_tar) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error opening the file \"" << filename_control_tar
@@ -662,7 +662,7 @@ int cmCPackDebGenerator::createDeb()
std::string const outputPath = outputDir + "/" + outputName;
std::string const tlDir = strGenWDIR + "/";
cmGeneratedFileStream debStream;
- debStream.Open(outputPath.c_str(), false, true);
+ debStream.Open(outputPath, false, true);
cmArchiveWrite deb(debStream, cmArchiveWrite::CompressNone, "arbsd");
// uid/gid should be the one of the root user, and this root user has
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7014676..6347eed 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -288,7 +288,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
if (!resB || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/InstallOutput.log";
- cmGeneratedFileStream ofs(tmpFile.c_str());
+ cmGeneratedFileStream ofs(tmpFile);
ofs << "# Run command: " << ic << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
@@ -369,7 +369,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
inFile += '/';
}
for (cmsys::RegularExpression& reg : ignoreFilesRegex) {
- if (reg.find(inFile.c_str())) {
+ if (reg.find(inFile)) {
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Ignore file: " << inFile << std::endl);
skip = true;
@@ -660,7 +660,7 @@ int cmCPackGenerator::RunPreinstallTarget(
if (!resB || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/PreinstallOutput.log";
- cmGeneratedFileStream ofs(tmpFile.c_str());
+ cmGeneratedFileStream ofs(tmpFile);
ofs << "# Run command: " << buildCommand << std::endl
<< "# Directory: " << installDirectory << std::endl
<< "# Output:" << std::endl
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index e46b2cf..f75a750 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -305,7 +305,7 @@ int cmCPackNSISGenerator::PackageFiles()
nsisCmd.c_str(), &output, &output, &retVal, nullptr,
this->GeneratorVerbose, cmDuration::zero());
if (!res || retVal) {
- cmGeneratedFileStream ofs(tmpFile.c_str());
+ cmGeneratedFileStream ofs(tmpFile);
ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
@@ -416,7 +416,7 @@ int cmCPackNSISGenerator::InitializeInternal()
const char* topDir = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
std::string tmpFile = topDir ? topDir : ".";
tmpFile += "/NSISOutput.log";
- cmGeneratedFileStream ofs(tmpFile.c_str());
+ cmGeneratedFileStream ofs(tmpFile);
ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
@@ -726,7 +726,7 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
cmSystemTools::IsOn(this->GetOption("CPACK_ZIP_NEED_QUOTES"));
unsigned long totalSize = 0;
{ // the scope is needed for cmGeneratedFileStream
- cmGeneratedFileStream out(zipListFileName.c_str());
+ cmGeneratedFileStream out(zipListFileName);
for (std::string const& file : component->Files) {
if (needQuotesInFile) {
out << "\"";
@@ -754,7 +754,7 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
if (!res || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/CompressZip.log";
- cmGeneratedFileStream ofs(tmpFile.c_str());
+ cmGeneratedFileStream ofs(tmpFile);
ofs << "# Run command: " << cmd << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index 4ca0fa8..76b3275 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -144,10 +144,10 @@ bool cmCPackProductBuildGenerator::RunProductBuild(const std::string& command)
tmpFile += "/ProductBuildOutput.log";
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << command << std::endl);
- std::string output, error_output;
+ std::string output;
int retVal = 1;
bool res = cmSystemTools::RunSingleCommand(
- command.c_str(), &output, &error_output, &retVal, nullptr,
+ command.c_str(), &output, &output, &retVal, nullptr,
this->GeneratorVerbose, cmDuration::zero());
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running command" << std::endl);
if (!res || retVal) {