summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Linux.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/Platform/Linux.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/Platform/Linux.cmake')
-rw-r--r--Modules/Platform/Linux.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index c1dc642..fe8e003 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -16,7 +16,7 @@ set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-endforeach(type)
+endforeach()
# Debian policy requires that shared libraries be installed without
# executable permission. Fedora policy requires that shared libraries
@@ -31,7 +31,7 @@ if(DEFINED CMAKE_INSTALL_SO_NO_EXE)
# 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)
+else()
# 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
@@ -39,11 +39,11 @@ else(DEFINED CMAKE_INSTALL_SO_NO_EXE)
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")
+ else()
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)
+ endif()
+endif()
# Match multiarch library directory names.
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
@@ -54,4 +54,4 @@ include(Platform/UnixPaths)
# searched.
if(EXISTS "/etc/debian_version")
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
-endif(EXISTS "/etc/debian_version")
+endif()