diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:50:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:19:16 (GMT) |
commit | 9db3116226cb99fcf54e936c833953abcde9b729 (patch) | |
tree | bd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindThreads.cmake | |
parent | 77543bde41b0e52c3959016698b529835945d62d (diff) | |
download | CMake-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/FindThreads.cmake')
-rw-r--r-- | Modules/FindThreads.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 22bffef..5d76777 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -78,9 +78,9 @@ else() set(CMAKE_HAVE_THREADS_LIBRARY 1) set(Threads_FOUND TRUE) endif() - endif(CMAKE_SYSTEM MATCHES "SunOS.*") - endif(NOT CMAKE_HAVE_THREADS_LIBRARY) - endif(NOT THREADS_HAVE_PTHREAD_ARG) + endif() + endif() + endif() if(NOT CMAKE_HAVE_THREADS_LIBRARY) # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread @@ -109,15 +109,15 @@ else() "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") endif() - endif("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") + endif() if(THREADS_HAVE_PTHREAD_ARG) set(Threads_FOUND TRUE) set(CMAKE_THREAD_LIBS_INIT "-pthread") endif() - endif(NOT CMAKE_HAVE_THREADS_LIBRARY) - endif(CMAKE_HAVE_PTHREAD_H) + endif() + endif() endif() if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE) @@ -145,7 +145,7 @@ if(CMAKE_USE_PTHREADS_INIT) set(CMAKE_THREAD_LIBS_INIT "-lcma") set(CMAKE_HP_PTHREADS_INIT 1) set(Threads_FOUND TRUE) - endif(CMAKE_HAVE_HP_CMA) + endif() set(CMAKE_USE_PTHREADS_INIT 1) endif() @@ -160,7 +160,7 @@ if(CMAKE_USE_PTHREADS_INIT) set(CMAKE_THREAD_LIBS_INIT ) set(CMAKE_USE_WIN32_THREADS_INIT 0) endif() -endif(CMAKE_USE_PTHREADS_INIT) +endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND) |