summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineRCCompiler.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/CMakeDetermineRCCompiler.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/CMakeDetermineRCCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 41a7af5..669dd16 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -24,33 +24,33 @@ if(NOT CMAKE_RC_COMPILER)
get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
if(CMAKE_RC_FLAGS_ENV_INIT)
set(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
- endif(CMAKE_RC_FLAGS_ENV_INIT)
+ endif()
if(EXISTS ${CMAKE_RC_COMPILER_INIT})
- else(EXISTS ${CMAKE_RC_COMPILER_INIT})
+ else()
message(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
- endif(EXISTS ${CMAKE_RC_COMPILER_INIT})
- endif($ENV{RC} MATCHES ".+")
+ endif()
+ endif()
# next try prefer the compiler specified by the generator
if(CMAKE_GENERATOR_RC)
if(NOT CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
- endif(NOT CMAKE_RC_COMPILER_INIT)
- endif(CMAKE_GENERATOR_RC)
+ endif()
+ endif()
# finally list compilers to try
if(CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
- else(CMAKE_RC_COMPILER_INIT)
+ else()
set(CMAKE_RC_COMPILER_LIST rc)
- endif(CMAKE_RC_COMPILER_INIT)
+ endif()
# Find the compiler.
find_program(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
if(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
- endif(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
-endif(NOT CMAKE_RC_COMPILER)
+ endif()
+endif()
mark_as_advanced(CMAKE_RC_COMPILER)