summaryrefslogtreecommitdiffstats
path: root/Modules/FindTCL.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/FindTCL.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/FindTCL.cmake')
-rw-r--r--Modules/FindTCL.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 9fe2c7a..0d20da5 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -50,12 +50,12 @@ include(FindWish)
if(TCLSH_VERSION_STRING)
set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
-else(TCLSH_VERSION_STRING)
+else()
get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
string(REGEX REPLACE
"^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
-endif(TCLSH_VERSION_STRING)
+endif()
get_filename_component(TK_WISH_PATH "${TK_WISH}" PATH)
get_filename_component(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
@@ -101,7 +101,7 @@ if(WIN32)
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib"
)
-endif(WIN32)
+endif()
find_library(TCL_LIBRARY
NAMES
@@ -137,9 +137,9 @@ if(Tcl_FRAMEWORKS)
if(NOT TCL_INCLUDE_PATH)
foreach(dir ${Tcl_FRAMEWORKS})
set(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
- endforeach(dir)
- endif(NOT TCL_INCLUDE_PATH)
-endif(Tcl_FRAMEWORKS)
+ endforeach()
+ endif()
+endif()
set(TK_FRAMEWORK_INCLUDES)
if(Tk_FRAMEWORKS)
@@ -147,9 +147,9 @@ if(Tk_FRAMEWORKS)
foreach(dir ${Tk_FRAMEWORKS})
set(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
${dir}/Headers ${dir}/PrivateHeaders)
- endforeach(dir)
- endif(NOT TK_INCLUDE_PATH)
-endif(Tk_FRAMEWORKS)
+ endforeach()
+ endif()
+endif()
set(TCLTK_POSSIBLE_INCLUDE_PATHS
"${TCL_LIBRARY_PATH_PARENT}/include"
@@ -183,7 +183,7 @@ if(WIN32)
"C:/Program Files/Tcl/include"
"C:/Tcl/include"
)
-endif(WIN32)
+endif()
find_path(TCL_INCLUDE_PATH
NAMES tcl.h