Package: getdp / 2.11.3+dfsg1-2

petsc.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: Petsc
Index: getdp-2.11.3-source/CMakeLists.txt
===================================================================
--- getdp-2.11.3-source.orig/CMakeLists.txt
+++ getdp-2.11.3-source/CMakeLists.txt
@@ -414,13 +414,15 @@ if(ENABLE_PETSC)
       endif(PETSC_PACKAGES_INCLUDES)
     endif(PETSC_PACKAGES_INCLUDES)
     # find libraries (<= 3.0)
-    set(PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petsc)
+    set(PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petscsys petscsnes)
     find_all_libraries(PETSC_LIBS PETSC_LIBS_REQUIRED
                        ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib "")
+    message(STATUS "Using PETSC_LIBS : ${PETSC_LIBS}")
     # petsc 3.1 creates only one library (libpetsc)
     if(NOT PETSC_LIBS)
       find_library(PETSC_LIBS petsc PATHS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib
                    NO_DEFAULT_PATH)
+      message(STATUS "Using PETSC_LIB : ${PETSC_LIBS}")
     endif(NOT PETSC_LIBS)
     if(PETSC_LIBS)
       set_config_option(HAVE_PETSC "PETSc")
@@ -438,15 +440,22 @@ if(ENABLE_PETSC)
       else(SLEPC_DIR)
         set(ENV_SLEPC_DIR $ENV{SLEPC_DIR})
       endif(SLEPC_DIR)
-      find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib
+      set(SLEPC_LIBS_REQUIRED slepcsys slepcmfn slepceps slepcsvd slepcpep slepcnep)
+      find_all_libraries(SLEPC_LIBS SLEPC_LIBS_REQUIRED
+                       ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib "")
+      message(STATUS "Using SLEPC_LIBS : ${SLEPC_LIBS}")
+      if(NOT SLEPC_LIBS)
+        find_library(SLEPC_LIBS slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib
                    NO_DEFAULT_PATH)
-      if(SLEPC_LIB)
+        message(STATUS "Using SLEPC_LIB : ${SLEPC_LIBS}")
+      endif(NOT SLEPC_LIBS)
+      if(SLEPC_LIBS)
         find_path(SLEPC_INC "slepc.h" PATHS ${ENV_SLEPC_DIR} PATH_SUFFIXES include
                   ${ENV_PETSC_ARCH}/include include/slepc NO_DEFAULT_PATH)
         if(SLEPC_INC)
           message(STATUS "Using SLEPc dir: ${ENV_SLEPC_DIR}")
           set_config_option(HAVE_SLEPC "SLEPc")
-          list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIB})
+          list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIBS})
           list(APPEND EXTERNAL_INCLUDES ${SLEPC_INC})
           find_path(SLEPC_INC2 "slepcconf.h" PATHS ${ENV_SLEPC_DIR}
                     PATH_SUFFIXES ${ENV_PETSC_ARCH}/include NO_DEFAULT_PATH)
@@ -454,7 +463,7 @@ if(ENABLE_PETSC)
             list(APPEND EXTERNAL_INCLUDES ${SLEPC_INC2})
           endif(SLEPC_INC2)
         endif(SLEPC_INC)
-      endif(SLEPC_LIB)
+      endif(SLEPC_LIBS)
     endif(ENABLE_SLEPC)
     list(APPEND EXTERNAL_LIBRARIES ${PETSC_LIBS})
     # find additional libraries to link with