[cmake-commits] hoffman committed cmCPackTGZGenerator.cxx 1.17 1.18
cmCPackTarCompressGenerator.cxx 1.8 1.9
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jul 30 22:51:23 EDT 2007
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv25623/Source/CPack
Modified Files:
cmCPackTGZGenerator.cxx cmCPackTarCompressGenerator.cxx
Log Message:
ENH: use gnu tar for cygwin
Index: cmCPackTGZGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTGZGenerator.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cmCPackTGZGenerator.cxx 30 Oct 2006 16:22:48 -0000 1.17
+++ cmCPackTGZGenerator.cxx 31 Jul 2007 02:51:21 -0000 1.18
@@ -228,11 +228,18 @@
std::auto_ptr<char> realNamePtr(realName);
strcpy(realName, outFileName);
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,
- &gztype,
- flags, 0644,
- (this->GeneratorVerbose?TAR_VERBOSE:0)
- | 0) == -1)
+ &gztype,
+ flags, 0644,
+ options) == -1)
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): "
<< strerror(errno) << std::endl);
Index: cmCPackTarCompressGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackTarCompressGenerator.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cmCPackTarCompressGenerator.cxx 20 Mar 2007 16:44:36 -0000 1.8
+++ cmCPackTarCompressGenerator.cxx 31 Jul 2007 02:51:21 -0000 1.9
@@ -174,12 +174,19 @@
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);
More information about the Cmake-commits
mailing list