summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackSTGZGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-14 16:15:54 (GMT)
committerBrad King <brad.king@kitware.com>2021-04-14 17:14:09 (GMT)
commitec1b6157cbfefdcac5c971021a5700dd80318a09 (patch)
treecf77e28ebb95ce81ec4fa7b91c674bfe62b378cd /Source/CPack/cmCPackSTGZGenerator.cxx
parenteef585efaa49d546a9af2939a147c971c76de03e (diff)
downloadCMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.zip
CMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.tar.gz
CMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.tar.bz2
Update CMake code using KWSys to account for Status return values
KWSys as of 2021-04-14 changed the return type of `SystemTools` operations from `bool` to `Status`. Update our call sites. This may improve error reporting accuracy in a few places.
Diffstat (limited to 'Source/CPack/cmCPackSTGZGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 3e36e8c..ad0a3e2 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -51,15 +51,16 @@ int cmCPackSTGZGenerator::PackageFiles()
* so we must iterate over generated packages.
*/
for (std::string const& pfn : this->packageFileNames) {
- retval &= cmSystemTools::SetPermissions(pfn.c_str(),
+ retval &= static_cast<bool>(
+ cmSystemTools::SetPermissions(pfn.c_str(),
#if defined(_MSC_VER) || defined(__MINGW32__)
- S_IREAD | S_IWRITE | S_IEXEC
+ S_IREAD | S_IWRITE | S_IEXEC
#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;
}