summaryrefslogtreecommitdiffstats
path: root/Modules/FindLAPACK.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/FindLAPACK.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/FindLAPACK.cmake')
-rw-r--r--Modules/FindLAPACK.cmake114
1 files changed, 57 insertions, 57 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index b867f21..430e45f 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -41,9 +41,9 @@ set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if (NOT _LANGUAGES_ MATCHES Fortran)
include(CheckFunctionExists)
-else (NOT _LANGUAGES_ MATCHES Fortran)
+else ()
include(CheckFortranFunctionExists)
-endif (NOT _LANGUAGES_ MATCHES Fortran)
+endif ()
set(LAPACK_FOUND FALSE)
set(LAPACK95_FOUND FALSE)
@@ -81,18 +81,18 @@ foreach(_library ${_list})
if (BLA_STATIC)
if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
- endif ( WIN32 )
+ endif ()
if (APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
- else (APPLE)
+ else ()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- endif (APPLE)
- else (BLA_STATIC)
+ endif ()
+ else ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# for ubuntu's libblas3gf and liblapack3gf packages
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
endif ()
- endif (BLA_STATIC)
+ endif ()
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
PATHS ${_libdir}
@@ -100,35 +100,35 @@ foreach(_library ${_list})
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
- endif(_libraries_work)
-endforeach(_library ${_list})
+ endif()
+endforeach()
if(_libraries_work)
# Test this combination of libraries.
if(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads})
- else(UNIX AND BLA_STATIC)
+ else()
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
- endif(UNIX AND BLA_STATIC)
+ endif()
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
if (NOT _LANGUAGES_ MATCHES Fortran)
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
- else (NOT _LANGUAGES_ MATCHES Fortran)
+ else ()
check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
- endif (NOT _LANGUAGES_ MATCHES Fortran)
+ endif ()
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
-endif(_libraries_work)
+endif()
if(_libraries_work)
set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads})
- else(_libraries_work)
+ else()
set(${LIBRARIES} FALSE)
- endif(_libraries_work)
+ endif()
-endmacro(Check_Lapack_Libraries)
+endmacro()
set(LAPACK_LINKER_FLAGS)
@@ -138,20 +138,20 @@ set(LAPACK95_LIBRARIES)
if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
find_package(BLAS)
-else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+else()
find_package(BLAS REQUIRED)
-endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+endif()
if(BLAS_FOUND)
set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS})
if ($ENV{BLA_VENDOR} MATCHES ".+")
set(BLA_VENDOR $ENV{BLA_VENDOR})
- else ($ENV{BLA_VENDOR} MATCHES ".+")
+ else ()
if(NOT BLA_VENDOR)
set(BLA_VENDOR "All")
- endif(NOT BLA_VENDOR)
- endif ($ENV{BLA_VENDOR} MATCHES ".+")
+ endif()
+ endif ()
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES)
@@ -164,8 +164,8 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
"${BLAS_LIBRARIES}"
""
)
- endif(NOT LAPACK_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
+ endif()
+endif ()
#acml lapack
@@ -187,8 +187,8 @@ if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
"${BLAS_LIBRARIES}"
""
)
- endif(NOT LAPACK_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
+ endif()
+endif ()
if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
if ( NOT LAPACK_LIBRARIES )
check_lapack_libraries(
@@ -200,8 +200,8 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
"${BLAS_LIBRARIES}"
""
)
- endif ( NOT LAPACK_LIBRARIES )
-endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
+ endif ()
+endif ()
# Generic LAPACK library?
if (BLA_VENDOR STREQUAL "Generic" OR
BLA_VENDOR STREQUAL "ATLAS" OR
@@ -216,7 +216,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR
"${BLAS_LIBRARIES}"
""
)
- endif ( NOT LAPACK_LIBRARIES )
+ endif ()
endif ()
#intel lapack
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
@@ -226,9 +226,9 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
find_PACKAGE(Threads)
- else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+ else()
find_package(Threads REQUIRED)
- endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+ endif()
if (BLA_F95)
if(NOT LAPACK95_LIBRARIES)
# old
@@ -241,7 +241,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"${BLAS95_LIBRARIES}"
"${CMAKE_THREAD_LIBS_INIT};${LM}"
)
- endif(NOT LAPACK95_LIBRARIES)
+ endif()
if(NOT LAPACK95_LIBRARIES)
# new >= 10.3
check_lapack_libraries(
@@ -253,8 +253,8 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"${BLAS95_LIBRARIES}"
"${CMAKE_THREAD_LIBS_INIT};${LM}"
)
- endif(NOT LAPACK95_LIBRARIES)
- else(BLA_F95)
+ endif()
+ else()
if(NOT LAPACK_LIBRARIES)
# old
check_lapack_libraries(
@@ -266,7 +266,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"${BLAS_LIBRARIES}"
"${CMAKE_THREAD_LIBS_INIT};${LM}"
)
- endif(NOT LAPACK_LIBRARIES)
+ endif()
if(NOT LAPACK_LIBRARIES)
# new >= 10.3
check_lapack_libraries(
@@ -278,59 +278,59 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"${BLAS_LIBRARIES}"
"${CMAKE_THREAD_LIBS_INIT};${LM}"
)
- endif(NOT LAPACK_LIBRARIES)
- endif(BLA_F95)
- endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-else(BLAS_FOUND)
+ endif()
+ endif()
+ endif ()
+endif()
+else()
message(STATUS "LAPACK requires BLAS")
-endif(BLAS_FOUND)
+endif()
if(BLA_F95)
if(LAPACK95_LIBRARIES)
set(LAPACK95_FOUND TRUE)
- else(LAPACK95_LIBRARIES)
+ else()
set(LAPACK95_FOUND FALSE)
- endif(LAPACK95_LIBRARIES)
+ endif()
if(NOT LAPACK_FIND_QUIETLY)
if(LAPACK95_FOUND)
message(STATUS "A library with LAPACK95 API found.")
- else(LAPACK95_FOUND)
+ else()
if(LAPACK_FIND_REQUIRED)
message(FATAL_ERROR
"A required library with LAPACK95 API not found. Please specify library location."
)
- else(LAPACK_FIND_REQUIRED)
+ else()
message(STATUS
"A library with LAPACK95 API not found. Please specify library location."
)
- endif(LAPACK_FIND_REQUIRED)
- endif(LAPACK95_FOUND)
- endif(NOT LAPACK_FIND_QUIETLY)
+ endif()
+ endif()
+ endif()
set(LAPACK_FOUND "${LAPACK95_FOUND}")
set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}")
-else(BLA_F95)
+else()
if(LAPACK_LIBRARIES)
set(LAPACK_FOUND TRUE)
- else(LAPACK_LIBRARIES)
+ else()
set(LAPACK_FOUND FALSE)
- endif(LAPACK_LIBRARIES)
+ endif()
if(NOT LAPACK_FIND_QUIETLY)
if(LAPACK_FOUND)
message(STATUS "A library with LAPACK API found.")
- else(LAPACK_FOUND)
+ else()
if(LAPACK_FIND_REQUIRED)
message(FATAL_ERROR
"A required library with LAPACK API not found. Please specify library location."
)
- else(LAPACK_FIND_REQUIRED)
+ else()
message(STATUS
"A library with LAPACK API not found. Please specify library location."
)
- endif(LAPACK_FIND_REQUIRED)
- endif(LAPACK_FOUND)
- endif(NOT LAPACK_FIND_QUIETLY)
-endif(BLA_F95)
+ endif()
+ endif()
+ endif()
+endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})