[cmake-commits] hoffman committed Linux.cmake 1.8.2.2 1.8.2.3

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jun 29 12:58:19 EDT 2007


Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv8749/Modules/Platform

Modified Files:
      Tag: CMake-2-4
	Linux.cmake 
Log Message:
ENH: RC 11


Index: Linux.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux.cmake,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -u -d -r1.8.2.2 -r1.8.2.3
--- Linux.cmake	13 Oct 2006 14:52:01 -0000	1.8.2.2
+++ Linux.cmake	29 Jun 2007 16:58:17 -0000	1.8.2.3
@@ -18,4 +18,31 @@
   SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
 ENDFOREACH(type)
 
+# Debian policy requires that shared libraries be installed without
+# executable permission.  Fedora policy requires that shared libraries
+# be installed with the executable permission.  Since the native tools
+# create shared libraries with execute permission in the first place a
+# reasonable policy seems to be to install with execute permission by
+# default.  In order to support debian packages we provide an option
+# here.  The option default is based on the current distribution, but
+# packagers can set it explicitly on the command line.
+IF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+  # Store the decision variable in the cache.  This preserves any
+  # setting the user provides on the command line.
+  SET(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL
+    "Install .so files without execute permission.")
+ELSE(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+  # Store the decision variable as an internal cache entry to avoid
+  # checking the platform every time.  This option is advanced enough
+  # that only package maintainers should need to adjust it.  They are
+  # capable of providing a setting on the command line.
+  IF(EXISTS "/etc/debian_version")
+    SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
+      "Install .so files without execute permission.")
+  ELSE(EXISTS "/etc/debian_version")
+    SET(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
+      "Install .so files without execute permission.")
+  ENDIF(EXISTS "/etc/debian_version")
+ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+
 INCLUDE(Platform/UnixPaths)



More information about the Cmake-commits mailing list