diff options
author | Brad King <brad.king@kitware.com> | 2007-04-10 15:22:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-04-10 15:22:15 (GMT) |
commit | a017333d9a7c58e573a4a0ba98fed62909832445 (patch) | |
tree | e4257bc206bb3be7cedca940960d120b89003792 /Source/cmFileCommand.cxx | |
parent | 8b0c61c322f939f2d718e71c5c796df9d58c6cc2 (diff) | |
download | CMake-a017333d9a7c58e573a4a0ba98fed62909832445.zip CMake-a017333d9a7c58e573a4a0ba98fed62909832445.tar.gz CMake-a017333d9a7c58e573a4a0ba98fed62909832445.tar.bz2 |
ENH: Added option CMAKE_INSTALL_SO_NO_EXE on linux to choose whether the default permissions for shared libraries include the executable bit. This is necessary to support the conflicting policies of Debian and Fedora. These changes address bug#4805.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 1353988..d988dd3 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1184,6 +1184,9 @@ bool cmFileCommand::HandleInstallCommand( } } + // Choose a default for shared library permissions. + bool install_so_no_exe = this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE"); + // If file permissions were not specified set default permissions // for this target type. if(!use_given_permissions_file && !use_source_permissions) @@ -1192,15 +1195,16 @@ bool cmFileCommand::HandleInstallCommand( { case cmTarget::SHARED_LIBRARY: case cmTarget::MODULE_LIBRARY: -#if defined(__linux__) - // Use read/write permissions. - permissions_file = 0; - permissions_file |= mode_owner_read; - permissions_file |= mode_owner_write; - permissions_file |= mode_group_read; - permissions_file |= mode_world_read; - break; -#endif + if(install_so_no_exe) + { + // Use read/write permissions. + permissions_file = 0; + permissions_file |= mode_owner_read; + permissions_file |= mode_owner_write; + permissions_file |= mode_group_read; + permissions_file |= mode_world_read; + break; + } case cmTarget::EXECUTABLE: case cmTarget::INSTALL_PROGRAMS: // Use read/write/executable permissions. |