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.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index ee1070f..1756218 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -10,6 +10,7 @@
#include "cmWorkingDirectory.h"
#include <cstring>
+#include <map>
#include <ostream>
#include <utility>
#include <vector>
@@ -111,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)
{