summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-19 18:41:56 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-03-19 18:41:56 (GMT)
commit1df15c68d53865f5c0803522ff8ba01bc78177f8 (patch)
tree2885dafd129834696e53cd1a225f1b28e760036c /Source/CPack
parent36a85b4cd5dd725e4c5f73ea3350f1a78de63bda (diff)
parent4576f40ee0f1306189179919efb35c915fe49cf1 (diff)
downloadCMake-1df15c68d53865f5c0803522ff8ba01bc78177f8.zip
CMake-1df15c68d53865f5c0803522ff8ba01bc78177f8.tar.gz
CMake-1df15c68d53865f5c0803522ff8ba01bc78177f8.tar.bz2
Merge topic 'CPack-fixSTGZpermission-bug13046'
4576f40 CPack STGZ put execute permission on all packages files (component case)
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 184c557..966a231 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -54,21 +54,32 @@ int cmCPackSTGZGenerator::InitializeInternal()
//----------------------------------------------------------------------
int cmCPackSTGZGenerator::PackageFiles()
{
+ bool retval = true;
if ( !this->Superclass::PackageFiles() )
{
return 0;
}
- return cmSystemTools::SetPermissions(packageFileNames[0].c_str(),
+
+ /* TGZ generator (our Superclass) may
+ * have generated several packages (component packaging)
+ * so we must iterate over generated packages.
+ */
+ for (std::vector<std::string>::iterator it=packageFileNames.begin();
+ it != packageFileNames.end(); ++it)
+ {
+ retval &= cmSystemTools::SetPermissions((*it).c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
- S_IREAD | S_IWRITE | S_IEXEC
+ S_IREAD | S_IWRITE | S_IEXEC
#elif defined( __BORLANDC__ )
- S_IRUSR | S_IWUSR | S_IXUSR
+ S_IRUSR | S_IWUSR | S_IXUSR
#else
- S_IRUSR | S_IWUSR | S_IXUSR |
- S_IRGRP | S_IWGRP | S_IXGRP |
- S_IROTH | S_IWOTH | S_IXOTH
+ S_IRUSR | S_IWUSR | S_IXUSR |
+ S_IRGRP | S_IWGRP | S_IXGRP |
+ S_IROTH | S_IWOTH | S_IXOTH
#endif
- );
+ );
+ }
+ return retval;
}
//----------------------------------------------------------------------