summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-12-17 20:27:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-12-17 20:27:30 (GMT)
commit4c108d2a240ed384dc675b3e7db99297056d790a (patch)
tree8dfe6532b184a49e23176e010732adfd90cadf13 /Source/CPack
parent5e0dadbfb86163888de894a7806d67f0549444d1 (diff)
downloadCMake-4c108d2a240ed384dc675b3e7db99297056d790a.zip
CMake-4c108d2a240ed384dc675b3e7db99297056d790a.tar.gz
CMake-4c108d2a240ed384dc675b3e7db99297056d790a.tar.bz2
ENH: try to fix dashboard
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 47078a7..1e9a3eb 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -112,7 +112,23 @@ int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName,
<< std::endl);
return 0;
}
-
+ // sometimes the pkgCmd finishes but the directory is not yet
+ // created, so try 10 times to see if it shows up
+ int tries = 10;
+ while(tries > 0 &&
+ !cmSystemTools::FileExists(packageDirFileName.c_str()))
+ {
+ cmSystemTools::Delay(500);
+ tries--;
+ }
+ if(!cmSystemTools::FileExists(packageDirFileName.c_str()))
+ {
+ cmCPackLogger(
+ cmCPackLog::LOG_ERROR,
+ "Problem running PackageMaker command: " << pkgCmd.str().c_str()
+ << std::endl << "Package not created: " << packageDirFileName.c_str()
+ << std::endl);
+ }
tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/hdiutilOutput.log";
cmOStringStream dmgCmd;