summaryrefslogtreecommitdiff
path: root/Modules/FindCurses.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:50:14 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindCurses.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadcmake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
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/FindCurses.cmake')
-rw-r--r--Modules/FindCurses.cmake24
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index de719921ee..6acf421261 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -32,7 +32,7 @@ set(CURSES_USE_NCURSES FALSE)
if(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
set(CURSES_USE_NCURSES TRUE)
-endif(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
+endif()
# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
# cygwin ncurses stopped providing curses.h symlinks see above
# message. Cygwin is an ncurses package, so force ncurses on
@@ -65,10 +65,10 @@ if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
wsyncup "" CURSES_NCURSES_HAS_WSYNCUP)
if( CURSES_NCURSES_HAS_WSYNCUP)
set(CURSES_USE_NCURSES TRUE)
- endif( CURSES_NCURSES_HAS_WSYNCUP)
- endif(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
+ endif()
+ endif()
-endif(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
+endif()
if(NOT CURSES_USE_NCURSES)
@@ -83,7 +83,7 @@ if(NOT CURSES_USE_NCURSES)
CACHE FILEPATH "The curses include path")
set(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}"
CACHE FILEPATH "The curses library")
-else(NOT CURSES_USE_NCURSES)
+else()
# we need to find ncurses
get_filename_component(_cursesLibDir "${CURSES_NCURSES_LIBRARY}" PATH)
get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)
@@ -109,23 +109,23 @@ else(NOT CURSES_USE_NCURSES)
if(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
get_filename_component(CURSES_NCURSES_INCLUDE_PATH
"${CURSES_HAVE_NCURSES_NCURSES_H}" PATH)
- endif(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
+ endif()
if(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
set( FORCE_IT )
if(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
set(FORCE_IT FORCE)
- endif(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
+ endif()
set(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path" ${FORCE_IT})
set( FORCE_IT)
if(CURSES_LIBRARY MATCHES NOTFOUND)
set(FORCE_IT FORCE)
- endif(CURSES_LIBRARY MATCHES NOTFOUND)
+ endif()
set(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
CACHE FILEPATH "The curses library" ${FORCE_IT})
- endif(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
+ endif()
-endif(NOT CURSES_USE_NCURSES)
+endif()
find_library(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
find_library(CURSES_EXTRA_LIBRARY cur_colr )
@@ -144,11 +144,11 @@ set(CURSES_LIBRARIES ${CURSES_LIBRARY})
if(CURSES_EXTRA_LIBRARY)
set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
-endif(CURSES_EXTRA_LIBRARY)
+endif()
if(CURSES_FORM_LIBRARY)
set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY})
-endif(CURSES_FORM_LIBRARY)
+endif()
# Proper name is *_INCLUDE_DIR
set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})