diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-10-04 13:54:55 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-10-04 13:54:55 (GMT) |
commit | a9fa71a47c09c18a7fcb86d9bed84d45ec03072d (patch) | |
tree | f82adff378aa5b2a78f649ed7248548f4e6cf275 /Source/CPack/cmCPackPackageMakerGenerator.cxx | |
parent | 78f68ef1b7e809ba6a91c685564ca65043fbde00 (diff) | |
download | CMake-a9fa71a47c09c18a7fcb86d9bed84d45ec03072d.zip CMake-a9fa71a47c09c18a7fcb86d9bed84d45ec03072d.tar.gz CMake-a9fa71a47c09c18a7fcb86d9bed84d45ec03072d.tar.bz2 |
Try to avoid cronic random failures on some Macs.
Diffstat (limited to 'Source/CPack/cmCPackPackageMakerGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackPackageMakerGenerator.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index befbc94..9333131 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -321,8 +321,19 @@ int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName, << "\" \"" << outFileName << "\""; std::string output; int retVal = 1; - bool res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, - &retVal, 0, this->GeneratorVerbose, 0); + 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()); |