summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenericGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-10-30 16:36:07 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-10-30 16:36:07 (GMT)
commit6e0cc37e8d773f78a552e36ed4abe7b1f87b2eea (patch)
tree8efd37fa7f468bbc02d9e52261a2cc82ef63e4d3 /Source/CPack/cmCPackGenericGenerator.cxx
parent676ed21c66b7e4297f655110e2164ff22916127c (diff)
downloadCMake-6e0cc37e8d773f78a552e36ed4abe7b1f87b2eea.zip
CMake-6e0cc37e8d773f78a552e36ed4abe7b1f87b2eea.tar.gz
CMake-6e0cc37e8d773f78a552e36ed4abe7b1f87b2eea.tar.bz2
ENH: merge fix for cpack crash into main tree
Diffstat (limited to 'Source/CPack/cmCPackGenericGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackGenericGenerator.cxx28
1 files changed, 18 insertions, 10 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx
index e949aa6..0102689 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,7 +158,8 @@ int cmCPackGenericGenerator::InstallProject()
if ( !cmsys::SystemTools::MakeDirectory(tempInstallDirectory))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "Problem creating temporary directory: " << tempInstallDirectory
+ "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,16 +690,23 @@ 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
+ 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);