1# GCC is the default compiler on GNU/Hurd. 2set(CMAKE_DL_LIBS "dl") 3set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") 4set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") 5set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") 6set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") 7set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") 8set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") 9set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") 10 11# Debian policy requires that shared libraries be installed without 12# executable permission. Fedora policy requires that shared libraries 13# be installed with the executable permission. Since the native tools 14# create shared libraries with execute permission in the first place a 15# reasonable policy seems to be to install with execute permission by 16# default. In order to support debian packages we provide an option 17# here. The option default is based on the current distribution, but 18# packagers can set it explicitly on the command line. 19if(DEFINED CMAKE_INSTALL_SO_NO_EXE) 20 # Store the decision variable in the cache. This preserves any 21 # setting the user provides on the command line. 22 set(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL 23 "Install .so files without execute permission.") 24else() 25 # Store the decision variable as an internal cache entry to avoid 26 # checking the platform every time. This option is advanced enough 27 # that only package maintainers should need to adjust it. They are 28 # capable of providing a setting on the command line. 29 if(EXISTS "/etc/debian_version") 30 set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL 31 "Install .so files without execute permission.") 32 else() 33 set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL 34 "Install .so files without execute permission.") 35 endif() 36endif() 37 38set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*") 39 40include(Platform/UnixPaths) 41