Previously CMake block termination commands were required to have arguments
matching the command starting the block. This is no longer necessary and not
the preferred style. This type of change has been implemented in other open
source projects such as: ITK, vxl, and BRAINSTools. It is the preferred style
for KDE. Consistent style practices help improve readability and
maintainability of code.
This was implemented with the shell script:
NOTE: MUST USE GNU compliant version of sed
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' \
| xargs -0 gsed -i -f convert.sed \
&& rm convert.sed
This is a reimplementation of ITK commit
e52dbe7fa476f6283c9b9d1507fca052355113a4
Fixes #585
40 lines
835 B
CMake
40 lines
835 B
CMake
# - Try to find ARPACK
|
|
# Once done this will define
|
|
#
|
|
# ARPACK_FOUND - system has ARPACK
|
|
# ARPACK_LIBRARY - Link this to use ARPACK
|
|
|
|
|
|
find_library(ARPACK_LIBRARY
|
|
NAMES arpack
|
|
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
|
|
)
|
|
|
|
|
|
if (ARPACK_LIBRARY)
|
|
set(ARPACK_FOUND YES)
|
|
else ()
|
|
# Search for PARPACK.
|
|
find_library(ARPACK_LIBRARY
|
|
NAMES parpack
|
|
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
|
|
)
|
|
|
|
if (ARPACK_LIBRARY)
|
|
set(ARPACK_FOUND YES)
|
|
else ()
|
|
set(ARPACK_FOUND NO)
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
if (ARPACK_FOUND)
|
|
if (NOT ARPACK_FIND_QUIETLY)
|
|
message(STATUS "Found an ARPACK library: ${ARPACK_LIBRARY}")
|
|
endif ()
|
|
else ()
|
|
if (ARPACK_FIND_REQUIRED)
|
|
message(FATAL_ERROR "Could not find an ARPACK library")
|
|
endif ()
|
|
endif ()
|