Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7beefae0 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'pastix_v5_or_6' into 'master'

Check either for pastix v5 or v6

See merge request !13
parents e0e2047c b1d3b87e
No related branches found
No related tags found
1 merge request!13Check either for pastix v5 or v6
...@@ -449,34 +449,47 @@ list(REMOVE_DUPLICATES _lib_env) ...@@ -449,34 +449,47 @@ list(REMOVE_DUPLICATES _lib_env)
# ------------------------------------------------ # ------------------------------------------------
# create list of libs to find # create list of libs to find
set(PASTIX_libs_to_find "pastix_murge;pastix") set(PASTIX_libs_to_find_v5 "pastix_murge;pastix")
set(PASTIX_libs_to_find_v6 "pastix;pastix_kernels;pastix_spm;pastix_bcsc")
# call cmake macro to find the lib path foreach(v 5 6)
if(PASTIX_LIBDIR) set(V_FOUND TRUE)
set(PASTIX_libs_to_find ${PASTIX_libs_to_find_v${v}})
message(STATUS "Looking for pastix -- Testing is version ${v}")
# call cmake macro to find the lib path
foreach(pastix_lib ${PASTIX_libs_to_find}) foreach(pastix_lib ${PASTIX_libs_to_find})
set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND") set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND")
find_library(PASTIX_${pastix_lib}_LIBRARY if(PASTIX_LIBDIR)
NAMES ${pastix_lib}
HINTS ${PASTIX_LIBDIR})
endforeach()
else()
if(PASTIX_DIR)
foreach(pastix_lib ${PASTIX_libs_to_find})
set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND")
find_library(PASTIX_${pastix_lib}_LIBRARY find_library(PASTIX_${pastix_lib}_LIBRARY
NAMES ${pastix_lib} NAMES ${pastix_lib}
HINTS ${PASTIX_DIR} HINTS ${PASTIX_LIBDIR})
PATH_SUFFIXES lib lib32 lib64) else()
endforeach() if(PASTIX_DIR)
else() find_library(PASTIX_${pastix_lib}_LIBRARY
foreach(pastix_lib ${PASTIX_libs_to_find}) NAMES ${pastix_lib}
set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND") HINTS ${PASTIX_DIR}
find_library(PASTIX_${pastix_lib}_LIBRARY PATH_SUFFIXES lib lib32 lib64)
NAMES ${pastix_lib} else()
HINTS ${_lib_env}) find_library(PASTIX_${pastix_lib}_LIBRARY
endforeach() NAMES ${pastix_lib}
HINTS ${_lib_env})
endif()
endif()
if (NOT PASTIX_${pastix_lib}_LIBRARY)
set (V_FOUND FALSE)
break()
endif()
endforeach()
if (V_FOUND)
set(PASTIX_VERSION_MAJOR ${v})
message(STATUS "Looking for pastix -- major version detected: ${PASTIX_VERSION_MAJOR}")
if (PASTIX_FIND_VERSION)
if (NOT ${PASTIX_VERSION_MAJOR} EQUAL ${PASTIX_FIND_VERSION_MAJOR})
message(FATAL_ERROR "Looking for pastix -- PaStiX version found differ from required")
endif()
endif()
break()
endif() endif()
endif() endforeach()
# If found, add path to cmake variable # If found, add path to cmake variable
# ------------------------------------ # ------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment