Files
mlpack/CMake/ARMA_FindBLAS.cmake
T
Alexander Leinoff 2330419b86 Removes CMake block termination arguments
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
2016-03-21 17:23:25 -05:00

45 lines
1.1 KiB
CMake

# - Find a BLAS library (no includes)
# This module defines
# BLAS_LIBRARIES, the libraries needed to use BLAS.
# BLAS_FOUND, If false, do not try to use BLAS.
# also defined, but not for general use are
# BLAS_LIBRARY, where to find the BLAS library.
set(BLAS_NAMES ${BLAS_NAMES} blas)
# Find the ATLAS version preferentially.
find_library(BLAS_LIBRARY
NAMES ${BLAS_NAMES}
PATHS /usr/lib64/atlas /usr/lib/atlas /usr/local/lib64/atlas /usr/local/lib/atlas
NO_DEFAULT_PATH)
find_library(BLAS_LIBRARY
NAMES ${BLAS_NAMES}
PATHS /usr/lib64/atlas /usr/lib/atlas /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)
if (BLAS_LIBRARY)
set(BLAS_LIBRARIES ${BLAS_LIBRARY})
set(BLAS_FOUND "YES")
else ()
set(BLAS_FOUND "NO")
endif ()
if (BLAS_FOUND)
if (NOT BLAS_FIND_QUIETLY)
message(STATUS "Found BLAS: ${BLAS_LIBRARIES}")
endif ()
else ()
if (BLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find BLAS")
endif ()
endif ()
# Deprecated declarations.
get_filename_component (NATIVE_BLAS_LIB_PATH ${BLAS_LIBRARY} PATH)
mark_as_advanced(
BLAS_LIBRARY
)