summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackArchiveGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index b43f1c9..1756218 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -112,13 +112,15 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
return 0; \
} \
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
- if (!(archive)) { \
- cmCPackLogger(cmCPackLog::LOG_ERROR, \
- "Problem to create archive <" \
- << (filename) << ">, ERROR = " << (archive).GetError() \
- << std::endl); \
- return 0; \
- }
+ do { \
+ if (!(archive)) { \
+ cmCPackLogger(cmCPackLog::LOG_ERROR, \
+ "Problem to create archive <" \
+ << (filename) << ">, ERROR = " << (archive).GetError() \
+ << std::endl); \
+ return 0; \
+ } \
+ } while (false)
int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
{