summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenericGenerator.cxx32
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx16
-rw-r--r--Source/CPack/cmCPackTGZGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackTarBZip2Generator.cxx2
-rw-r--r--Source/CPack/cmCPackTarCompressGenerator.cxx3
5 files changed, 35 insertions, 21 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx
index 062c700..52b2e14 100644
--- a/Source/CPack/cmCPackGenericGenerator.cxx
+++ b/Source/CPack/cmCPackGenericGenerator.cxx
@@ -99,10 +99,10 @@ int cmCPackGenericGenerator::PrepareNames()
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
const char* descFileName
= this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
- cmCPackLogger(cmCPackLog::LOG_DEBUG,
- "Look for: " << descFileName << std::endl);
if ( descFileName )
{
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Look for: " << descFileName << std::endl);
if ( !cmSystemTools::FileExists(descFileName) )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
@@ -158,8 +158,9 @@ int cmCPackGenericGenerator::InstallProject()
if ( !cmsys::SystemTools::MakeDirectory(tempInstallDirectory))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "Problem creating temporary directory: " << tempInstallDirectory
- << std::endl);
+ "Problem creating temporary directory: "
+ << (tempInstallDirectory ? tempInstallDirectory : "(NULL}")
+ << std::endl);
return 0;
}
@@ -409,10 +410,10 @@ int cmCPackGenericGenerator::InstallProjectViaInstallScript(
= this->GetOption("CPACK_INSTALL_SCRIPT");
std::string currentWorkingDirectory =
cmSystemTools::GetCurrentWorkingDirectory();
- cmCPackLogger(cmCPackLog::LOG_OUTPUT,
- "- Install scripts: " << cmakeScripts << std::endl);
if ( cmakeScripts && *cmakeScripts )
{
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT,
+ "- Install scripts: " << cmakeScripts << std::endl);
std::vector<std::string> cmakeScriptsVector;
cmSystemTools::ExpandListArgument(cmakeScripts,
cmakeScriptsVector);
@@ -667,7 +668,7 @@ int cmCPackGenericGenerator::ProcessGenerator()
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Compress package" << std::endl);
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress files to: "
- << tempPackageFileName << std::endl);
+ << (tempPackageFileName ? tempPackageFileName : "(NULL)") << std::endl);
if ( cmSystemTools::FileExists(tempPackageFileName) )
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file"
@@ -689,17 +690,24 @@ int cmCPackGenericGenerator::ProcessGenerator()
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Finalize package" << std::endl);
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Copy final package: "
- << tempPackageFileName << " to " << packageFileName << std::endl);
+ << (tempPackageFileName ? tempPackageFileName : "(NULL)" )
+ << " to "
+ << (packageFileName ? packageFileName : "(NULL)")
+ << std::endl);
if ( !cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
packageFileName) )
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the package: "
- << tempPackageFileName << " to " << packageFileName << std::endl);
+ << (tempPackageFileName ? tempPackageFileName : "(NULL)" )
+ << " to "
+ << (packageFileName ? packageFileName : "(NULL)")
+ << std::endl);
return 0;
}
- cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Package " << packageFileName
- << " generated." << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Package "
+ << (packageFileName ? packageFileName : "(NULL)")
+ << " generated." << std::endl);
return 1;
}
@@ -939,7 +947,7 @@ const char* cmCPackGenericGenerator::GetInstallPath()
std::string cmCPackGenericGenerator::FindTemplate(const char* name)
{
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
- << name << std::endl);
+ << (name ? name : "(NULL)") << std::endl);
std::string ffile = this->MakefileMap->GetModulesFile(name);
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: "
<< ffile.c_str() << std::endl);
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 2413000..95c1e1d 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -236,14 +236,17 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name)
if ( !inFileName )
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str()
- << " not specified. It should point to " << name << ".rtf, " << name
- << ".html, or " << name << ".txt file" << std::endl);
+ << " not specified. It should point to "
+ << (name ? name : "(NULL)")
+ << ".rtf, " << name
+ << ".html, or " << name << ".txt file" << std::endl);
return false;
}
if ( !cmSystemTools::FileExists(inFileName) )
{
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " << name
- << " resource file: " << inFileName << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find "
+ << (name ? name : "(NULL)")
+ << " resource file: " << inFileName << std::endl);
return false;
}
std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName);
@@ -260,8 +263,9 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name)
destFileName += name + ext;
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << inFileName
- << " to " << destFileName.c_str() << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
+ << (inFileName ? inFileName : "(NULL)")
+ << " to " << destFileName.c_str() << std::endl);
this->ConfigureFile(inFileName, destFileName.c_str());
return true;
}
diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx
index 133fe0a..cafb0f5 100644
--- a/Source/CPack/cmCPackTGZGenerator.cxx
+++ b/Source/CPack/cmCPackTGZGenerator.cxx
@@ -208,7 +208,8 @@ int cmCPackTGZGenerator::InitializeInternal()
int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
const char* toplevel, const std::vector<std::string>& files)
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " << toplevel << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
+ << (toplevel ? toplevel : "(NULL)") << std::endl);
cmCPackTGZ_Data mydata(this, this->Compress);
TAR *t;
char buf[TAR_MAXPATHLEN];
diff --git a/Source/CPack/cmCPackTarBZip2Generator.cxx b/Source/CPack/cmCPackTarBZip2Generator.cxx
index f58dc0f..17efda5 100644
--- a/Source/CPack/cmCPackTarBZip2Generator.cxx
+++ b/Source/CPack/cmCPackTarBZip2Generator.cxx
@@ -108,7 +108,7 @@ int cmCPackTarBZip2Generator::CompressFiles(const char* outFileName,
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem renaming: \""
<< compressOutFile.c_str() << "\" to \""
- << outFileName << std::endl);
+ << (outFileName ? outFileName : "(NULL)") << std::endl);
return 0;
}
}
diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx
index 85b70ce..8192f70 100644
--- a/Source/CPack/cmCPackTarCompressGenerator.cxx
+++ b/Source/CPack/cmCPackTarCompressGenerator.cxx
@@ -155,7 +155,8 @@ int cmCPackTarCompressGenerator::InitializeInternal()
int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName,
const char* toplevel, const std::vector<std::string>& files)
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " << toplevel << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
+ << (toplevel ? toplevel : "(NULL)") << std::endl);
cmCPackTarCompress_Data mydata(this);
TAR *t;
char buf[TAR_MAXPATHLEN];