summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackTarCompressGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cmCPackTarCompressGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackTarCompressGenerator.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx
index b73e553..67a6a83 100644
--- a/Source/CPack/cmCPackTarCompressGenerator.cxx
+++ b/Source/CPack/cmCPackTarCompressGenerator.cxx
@@ -174,12 +174,19 @@ int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName,
char* realName = new char[ strlen(outFileName) + 1 ];
std::auto_ptr<char> realNamePtr(realName);
strcpy(realName, outFileName);
- int flags = O_WRONLY | O_CREAT;
+ int flags = O_WRONLY | O_CREAT;
+ int options = 0;
+ if(this->GeneratorVerbose)
+ {
+ options |= TAR_VERBOSE;
+ }
+#ifdef __CYGWIN__
+ options |= TAR_GNU;
+#endif
if (tar_open(&t, realName,
&compressType,
flags, 0644,
- (this->GeneratorVerbose?TAR_VERBOSE:0)
- | 0) == -1)
+ options) == -1)
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): "
<< strerror(errno) << std::endl);