aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindSuperLU.cmake
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2016-07-10 02:29:57 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2016-07-10 02:29:57 +0200
commit3c795c6923134da2c887ab2a340de9c0bca888ab (patch)
treebb81261d5a686635a00c323ae5eecad4e3d5dcc0 /cmake/FindSuperLU.cmake
parent57113e00f9b0cb25e6982df13706687023cea944 (diff)
bug #1119: Adjust call to ?gssvx for SuperLU 5
Also improved corresponding cmake module to detect versions 5.x Based on patch by Christoph GrĂ¼ninger.
Diffstat (limited to 'cmake/FindSuperLU.cmake')
-rw-r--r--cmake/FindSuperLU.cmake23
1 files changed, 20 insertions, 3 deletions
diff --git a/cmake/FindSuperLU.cmake b/cmake/FindSuperLU.cmake
index e4142fe4d..f38146e06 100644
--- a/cmake/FindSuperLU.cmake
+++ b/cmake/FindSuperLU.cmake
@@ -17,7 +17,10 @@ find_path(SUPERLU_INCLUDES
SRC
)
-find_library(SUPERLU_LIBRARIES NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu" PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR} PATH_SUFFIXES lib)
+find_library(SUPERLU_LIBRARIES
+ NAMES "superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0" "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu"
+ PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR}
+ PATH_SUFFIXES lib)
if(SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)
@@ -48,11 +51,25 @@ int main() {
}"
SUPERLU_HAS_CLEAN_ENUMS)
-if(SUPERLU_HAS_CLEAN_ENUMS)
+check_cxx_source_compiles("
+typedef int int_t;
+#include <supermatrix.h>
+#include <slu_util.h>
+int main(void)
+{
+ GlobalLU_t glu;
+ return 0;
+}"
+SUPERLU_HAS_GLOBALLU_T)
+
+if(SUPERLU_HAS_GLOBALLU_T)
+ # at least 5.0
+ set(SUPERLU_VERSION_VAR "5.0")
+elseif(SUPERLU_HAS_CLEAN_ENUMS)
# at least 4.3
set(SUPERLU_VERSION_VAR "4.3")
elseif(SUPERLU_HAS_GLOBAL_MEM_USAGE_T)
- # at least 4.3
+ # at least 4.0
set(SUPERLU_VERSION_VAR "4.0")
else()
set(SUPERLU_VERSION_VAR "3.0")