summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackOSXX11Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-04 13:32:48 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-04 13:32:48 (GMT)
commit78f68ef1b7e809ba6a91c685564ca65043fbde00 (patch)
tree6a0ae69d516eee7fa01783326aa5bdeffda746cc /Source/CPack/cmCPackOSXX11Generator.cxx
parenteddfb095f981d43f463d72597a9691317ffc5ae7 (diff)
downloadCMake-78f68ef1b7e809ba6a91c685564ca65043fbde00.zip
CMake-78f68ef1b7e809ba6a91c685564ca65043fbde00.tar.gz
CMake-78f68ef1b7e809ba6a91c685564ca65043fbde00.tar.bz2
Try to avoid cronic random failures on some Macs.
Diffstat (limited to 'Source/CPack/cmCPackOSXX11Generator.cxx')
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index 11058c9..a3b5759 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -149,8 +149,21 @@ int cmCPackOSXX11Generator::CompressFiles(const char* outFileName,
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Compress disk image using command: "
<< dmgCmd.str().c_str() << std::endl);
- bool res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
- &retVal, 0, this->GeneratorVerbose, 0);
+ // since we get random dashboard failures with this one
+ // try running it more than once
+ int numTries = 4;
+ bool res;
+ while(numTries > 0)
+ {
+ res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
+ &retVal, 0,
+ this->GeneratorVerbose, 0);
+ if(res && retVal)
+ {
+ numTries = -1;
+ }
+ numTries--;
+ }
if ( !res || retVal )
{
cmGeneratedFileStream ofs(tmpFile.c_str());