diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2012-03-18 16:52:56 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2012-03-18 16:52:56 (GMT) |
commit | 4576f40ee0f1306189179919efb35c915fe49cf1 (patch) | |
tree | f96f2e6ec38ab67ec0a2d4dfdb84184bc6391e60 /Source/CPack/cmCPackSTGZGenerator.cxx | |
parent | 1bfe81e01e1fb8b4e790082d15ca7cf7d7b7f6ae (diff) | |
download | CMake-4576f40ee0f1306189179919efb35c915fe49cf1.zip CMake-4576f40ee0f1306189179919efb35c915fe49cf1.tar.gz CMake-4576f40ee0f1306189179919efb35c915fe49cf1.tar.bz2 |
CPack STGZ put execute permission on all packages files (component case)
Diffstat (limited to 'Source/CPack/cmCPackSTGZGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackSTGZGenerator.cxx | 25 |
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; } //---------------------------------------------------------------------- |