Skip to content
Snippets Groups Projects
Commit 1af1de73 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Merge][CMake] Merged revisions : 1695

Revision  r1695
.----------------------
[FindSuperLU.cmake]
Rework SuperLU check; it conforms to the way CMake wants checks. Thanks to Markus Blatt for the hints.

.----------------------


[[Imported from SVN: r1838]]
parents cbdfdfc5 bce5f1dd
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,17 @@ if(NOT BLAS_FOUND AND REQUIRED)
return()
endif(NOT BLAS_FOUND AND REQUIRED)
# look for header files
# look for header files, only at positions given by the user
find_path(SUPERLU_INCLUDE_DIR
NAMES supermatrix.h
PATHS ${SUPERLU_DIR}
PATH_SUFFIXES "superlu" "include/superlu" "include" "SRC"
NO_DEFAULT_PATH
)
# look for header files, including default paths
find_path(SUPERLU_INCLUDE_DIR
NAMES supermatrix.h
HINTS ${SUPERLU_DIR}
PATH_SUFFIXES "superlu" "include/superlu" "include" "SRC"
)
......@@ -27,11 +34,12 @@ find_path(SUPERLU_INCLUDE_DIR
find_library(SUPERLU_LIBRARY
NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu"
HINTS ${SUPERLU_DIR}
PATH_SUFFIXES "lib" "lib64"
PATH_SUFFIXES "lib" "lib32" "lib64"
)
# check version specific macros
include(CheckCSourceCompiles)
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES ${SUPERLU_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${SUPERLU_LIBRARY})
......@@ -53,8 +61,7 @@ int main(void)
return SLU_DOUBLE;
}"
SUPERLU_MIN_VERSION_4_3)
set(CMAKE_REQUIRED_INCLUDES "")
set(CMAKE_REQUIRED_LIBRARIES "")
cmake_pop_check_state()
if(SUPERLU_MIN_VERSION_4_3)
set(SUPERLU_WITH_VERSION "SuperLU >= 4.3" CACHE STRING
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment