]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Link against sundials_core. 17040/head
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 17 May 2024 12:29:24 +0000 (14:29 +0200)
committerMarc Fehling <mafehling.git@gmail.com>
Fri, 17 May 2024 13:16:43 +0000 (15:16 +0200)
cmake/modules/FindDEAL_II_SUNDIALS.cmake

index 212f8358fa73474fe449c6f81f648c737cf7c9f3..db2c8cea4202ac0ca49dadaed427e938fcdc1f33 100644 (file)
 set(SUNDIALS_DIR "" CACHE PATH "An optional hint to a SUNDIALS_DIR installation")
 set_if_empty(SUNDIALS_DIR "$ENV{SUNDIALS_DIR}")
 
+deal_ii_find_library(SUNDIALS_LIB_CORE NAMES sundials_core
+  HINTS ${SUNDIALS_DIR}
+  PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+  )
+
 deal_ii_find_library(SUNDIALS_LIB_IDAS NAMES sundials_idas
   HINTS ${SUNDIALS_DIR}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
@@ -121,8 +126,17 @@ if(NOT SUNDIALS_CONFIG_H MATCHES "-NOTFOUND")
     )
 endif()
 
+#
+# sundials_core is only required as of version 7.0.0.
+#
+set(_sundials_lib_core)
+if(SUNDIALS_VERSION VERSION_GREATER_EQUAL 7)
+  set(_sundials_lib_core "SUNDIALS_LIB_CORE")
+endif()
+
 process_feature(SUNDIALS
   LIBRARIES REQUIRED
+    ${_sundials_lib_core}
     ${_sundials_lib_ida}
     SUNDIALS_LIB_ARKODE
     SUNDIALS_LIB_KINSOL
@@ -131,6 +145,7 @@ process_feature(SUNDIALS
   INCLUDE_DIRS REQUIRED
     SUNDIALS_INCLUDE_DIR
   CLEAR
+    SUNDIALS_LIB_CORE
     SUNDIALS_LIB_IDA
     SUNDIALS_LIB_IDAS
     SUNDIALS_LIB_ARKODE

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.