[sundials] 03/06: patches
Dima Kogan
dima at secretsauce.net
Mon Apr 3 02:44:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkogan pushed a commit to branch master
in repository sundials.
commit 2a1a0c2646b053b975bf287ad0dc175e2dfeba9e
Author: Dima Kogan <dima at secretsauce.net>
Date: Sun Apr 2 19:31:25 2017 -0700
patches
---
...ndPETSc-to-use-pkg-config-where-possible.patch} | 56 +++--
...e-examples-use-default-sundials-libraries.patch | 264 +++++++++++++++++++++
...ode-examples-don-t-call-SUNDIALS_ADD_TEST.patch | 201 ++++++++++++++++
...6-example-added-forgotten-library-linkage.patch | 20 ++
...0007-arkode-library-now-links-with-libklu.patch | 24 ++
debian/patches/series | 6 +-
6 files changed, 541 insertions(+), 30 deletions(-)
diff --git a/debian/patches/0004-Improve-FindPETSc-to-use-pkg-config-where-possible.patch b/debian/patches/0003-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
similarity index 97%
rename from debian/patches/0004-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
rename to debian/patches/0003-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
index 45f5788..cfcc85f 100644
--- a/debian/patches/0004-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
+++ b/debian/patches/0003-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
@@ -4,9 +4,9 @@ Subject: Improve FindPETSc to use pkg-config where possible
---
CMakeLists.txt | 14 +++++----
- config/FindPETSc.cmake | 54 +++++++++++++++++----------------
+ config/FindPETSc.cmake | 50 +++++++++++++++++--------------
config/SundialsPETSc.cmake | 75 ----------------------------------------------
- 3 files changed, 37 insertions(+), 106 deletions(-)
+ 3 files changed, 35 insertions(+), 104 deletions(-)
delete mode 100644 config/SundialsPETSc.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -39,7 +39,7 @@ index 237889c..14bcea6 100644
ENDIF(PETSC_FOUND)
diff --git a/config/FindPETSc.cmake b/config/FindPETSc.cmake
-index 7c1f736..a84a27b 100644
+index 7c1f736..5fb3e56 100644
--- a/config/FindPETSc.cmake
+++ b/config/FindPETSc.cmake
@@ -17,32 +17,36 @@
@@ -52,30 +52,6 @@ index 7c1f736..a84a27b 100644
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
endif(WIN32)
+pkg_check_modules(PC_PETSC QUIET PETSc)
-+
-+find_path(PETSC_INCLUDE_DIR petsc.h
-+ HINTS ${PC_PETSC_INCLUDEDIR} ${PC_PETSC_INCLUDE_DIRS}
-+ PATHS PETSC_INCLUDE_DIR
-+ )
-+
-+find_library(PETSC_LIBRARY NAMES petsc
-+ HINTS ${PC_PETSC_LIBDIR} ${PC_PETSC_LIBRARY_DIRS} )
-+
-+include(CheckCSourceRuns)
-+set(CMAKE_REQUIRED_INCLUDES ${PETSC_INCLUDE_DIR})
-+set(CMAKE_REQUIRED_LIBRARIES ${PETSC_LIBRARY})
-+check_c_source_runs(
-+ "\#include \"petscvec.h\"\nint main(){Vec x;VecCreate(PETSC_COMM_WORLD, &x);return(0);}"
-+ PETSC_BUILD_STATUS
-+)
-+
-+include(FindPackageHandleStandardArgs)
-+# handle the QUIETLY and REQUIRED arguments and set PETSC_FOUND to TRUE
-+# if all listed variables are TRUE
-+find_package_handle_standard_args(PETSc DEFAULT_MSG
-+ PETSC_LIBRARY PETSC_INCLUDE_DIR PETSC_BUILD_STATUS)
-+
-+mark_as_advanced(PETSC_INCLUDE_DIR PETSC_LIBRARY )
-### Find include dir
-find_path(temp_PETSC_INCLUDE_DIR petsc.h ${PETSC_INCLUDE_DIR})
@@ -83,7 +59,11 @@ index 7c1f736..a84a27b 100644
- set(PETSC_INCLUDE_DIR ${temp_PETSC_INCLUDE_DIR})
-endif()
-unset(temp_PETSC_INCLUDE_DIR CACHE)
--
++find_path(PETSC_INCLUDE_DIR petsc.h
++ HINTS ${PC_PETSC_INCLUDEDIR} ${PC_PETSC_INCLUDE_DIRS}
++ PATHS PETSC_INCLUDE_DIR
++ )
+
-if (PETSC_LIBRARY)
- # We have (or were given) PETSC_LIBRARY - get path to use for any related libs
- get_filename_component(PETSC_LIBRARY_DIR ${PETSC_LIBRARY} PATH)
@@ -100,8 +80,26 @@ index 7c1f736..a84a27b 100644
- )
-endif ()
-mark_as_advanced(PETSC_LIBRARY)
--
++find_library(PETSC_LIBRARY NAMES petsc
++ HINTS ${PC_PETSC_LIBDIR} ${PC_PETSC_LIBRARY_DIRS} )
+
-set(PETSC_LIBRARIES ${PETSC_LIBRARY})
++include(CheckCSourceRuns)
++set(CMAKE_REQUIRED_INCLUDES ${PETSC_INCLUDE_DIR})
++set(CMAKE_REQUIRED_LIBRARIES ${PETSC_LIBRARY})
++check_c_source_runs(
++ "\#include \"petscvec.h\"\nint main(){Vec x;VecCreate(PETSC_COMM_WORLD, &x);return(0);}"
++ PETSC_BUILD_STATUS
++)
++
++include(FindPackageHandleStandardArgs)
++# handle the QUIETLY and REQUIRED arguments and set PETSC_FOUND to TRUE
++# if all listed variables are TRUE
++find_package_handle_standard_args(PETSc DEFAULT_MSG
++ PETSC_LIBRARY PETSC_INCLUDE_DIR PETSC_BUILD_STATUS)
++
++mark_as_advanced(PETSC_INCLUDE_DIR PETSC_LIBRARY )
++
+set(PETSC_LIBRARIES ${PETSC_LIBRARY} )
+set(PETSC_INCLUDE_DIRS ${PETSC_INCLUDE_DIR} )
diff --git a/config/SundialsPETSc.cmake b/config/SundialsPETSc.cmake
diff --git a/debian/patches/0004-arkode-examples-use-default-sundials-libraries.patch b/debian/patches/0004-arkode-examples-use-default-sundials-libraries.patch
new file mode 100644
index 0000000..c1c17a1
--- /dev/null
+++ b/debian/patches/0004-arkode-examples-use-default-sundials-libraries.patch
@@ -0,0 +1,264 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sun, 2 Apr 2017 19:27:22 -0700
+Subject: arkode examples: use default sundials libraries
+
+This should be applied to ALL examples. These examples should be buildable from
+/usr/share/doc/libsundials-something. The CMakeLists files are written to build
+them at BUILD time, but I want to already assume that the packages are installed
+and use those
+
+We now use the default libraries, which (when the packages are installed) are
+the shared libraries. The CMakeLists files were instead referring to ..._shared
+or ..._static, which doesn't refer to any installed-time files
+---
+ examples/arkode/CXX_parallel/CMakeLists.txt | 12 ++----------
+ examples/arkode/CXX_serial/CMakeLists.txt | 12 ++----------
+ examples/arkode/C_openmp/CMakeLists.txt | 12 ++----------
+ examples/arkode/C_parallel/CMakeLists.txt | 11 ++---------
+ examples/arkode/C_parhyp/CMakeLists.txt | 11 ++---------
+ examples/arkode/C_serial/CMakeLists.txt | 12 ++----------
+ examples/arkode/F77_parallel/CMakeLists.txt | 15 +++------------
+ examples/arkode/F77_serial/CMakeLists.txt | 15 +++------------
+ examples/arkode/F90_parallel/CMakeLists.txt | 14 +++-----------
+ examples/arkode/F90_serial/CMakeLists.txt | 15 +++------------
+ 10 files changed, 24 insertions(+), 105 deletions(-)
+
+diff --git a/examples/arkode/CXX_parallel/CMakeLists.txt b/examples/arkode/CXX_parallel/CMakeLists.txt
+index 8f51139..894edec 100644
+--- a/examples/arkode/CXX_parallel/CMakeLists.txt
++++ b/examples/arkode/CXX_parallel/CMakeLists.txt
+@@ -46,16 +46,8 @@ ELSE(MPI_MPICXX)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
+ ENDIF(MPI_MPICXX)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECP_LIB sundials_nvecparallel_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECP_LIB sundials_nvecparallel_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECP_LIB sundials_nvecparallel)
+
+ # Set-up linker flags and link libraries
+
+diff --git a/examples/arkode/CXX_serial/CMakeLists.txt b/examples/arkode/CXX_serial/CMakeLists.txt
+index 8ebc0f3..d64dd81 100644
+--- a/examples/arkode/CXX_serial/CMakeLists.txt
++++ b/examples/arkode/CXX_serial/CMakeLists.txt
+@@ -38,16 +38,8 @@ SET(ARKODE_extras
+ plot_sol.py
+ )
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECS_LIB sundials_nvecserial_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECS_LIB sundials_nvecserial_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECS_LIB sundials_nvecserial)
+
+ # Set-up linker flags and link libraries
+
+diff --git a/examples/arkode/C_openmp/CMakeLists.txt b/examples/arkode/C_openmp/CMakeLists.txt
+index 788f249..ccc55f1 100644
+--- a/examples/arkode/C_openmp/CMakeLists.txt
++++ b/examples/arkode/C_openmp/CMakeLists.txt
+@@ -35,16 +35,8 @@ SET(ARKODE_extras_OMP
+
+ ENDIF(OPENMP_FOUND)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECOMP_LIB sundials_nvecopenmp_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECOMP_LIB sundials_nvecopenmp_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECOMP_LIB sundials_nvecopenmp)
+
+ # Set-up linker flags and link libraries
+ SET(SUNDIALS_LIBS ${ARKODE_LIB} ${NVECOMP_LIB} ${EXTRA_LINK_LIBS})
+diff --git a/examples/arkode/C_parallel/CMakeLists.txt b/examples/arkode/C_parallel/CMakeLists.txt
+index 6d866f4..9e61de0 100644
+--- a/examples/arkode/C_parallel/CMakeLists.txt
++++ b/examples/arkode/C_parallel/CMakeLists.txt
+@@ -44,15 +44,8 @@ ELSE(MPI_MPICC)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
+ ENDIF(MPI_MPICC)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECP_LIB sundials_nvecparallel_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECP_LIB sundials_nvecparallel_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECP_LIB sundials_nvecparallel)
+
+ # Set-up linker flags and link libraries
+ SET(SUNDIALS_LIBS ${ARKODE_LIB} ${NVECP_LIB} ${EXTRA_LINK_LIBS})
+diff --git a/examples/arkode/C_parhyp/CMakeLists.txt b/examples/arkode/C_parhyp/CMakeLists.txt
+index b34b640..b224b84 100644
+--- a/examples/arkode/C_parhyp/CMakeLists.txt
++++ b/examples/arkode/C_parhyp/CMakeLists.txt
+@@ -44,15 +44,8 @@ ELSE(MPI_MPICC)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
+ ENDIF(MPI_MPICC)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECP_LIB sundials_nvecparhyp_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECP_LIB sundials_nvecparhyp_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECP_LIB sundials_nvecparhyp)
+
+ # Set-up linker flags and link libraries
+ SET(SUNDIALS_LIBS ${ARKODE_LIB} ${NVECP_LIB} ${EXTRA_LINK_LIBS})
+diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt
+index 97c3027..3985a4f 100644
+--- a/examples/arkode/C_serial/CMakeLists.txt
++++ b/examples/arkode/C_serial/CMakeLists.txt
+@@ -66,16 +66,8 @@ SET(ARKODE_extras
+ plot_sol_log.py
+ )
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECS_LIB sundials_nvecserial_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECS_LIB sundials_nvecserial_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECS_LIB sundials_nvecserial)
+
+ # Set-up linker flags and link libraries
+
+diff --git a/examples/arkode/F77_parallel/CMakeLists.txt b/examples/arkode/F77_parallel/CMakeLists.txt
+index 5454a4f..b9fd85b 100644
+--- a/examples/arkode/F77_parallel/CMakeLists.txt
++++ b/examples/arkode/F77_parallel/CMakeLists.txt
+@@ -45,18 +45,9 @@ ELSE(MPI_MPIF77)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
+ ENDIF(MPI_MPIF77)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECP_LIB sundials_nvecparallel_static)
+- SET(FNVECP_LIB sundials_fnvecparallel_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECP_LIB sundials_nvecparallel_shared)
+- SET(FNVECP_LIB sundials_fnvecparallel_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECP_LIB sundials_nvecparallel)
++SET(FNVECP_LIB sundials_fnvecparallel)
+
+ # Only static FCMIX libraries are available
+
+diff --git a/examples/arkode/F77_serial/CMakeLists.txt b/examples/arkode/F77_serial/CMakeLists.txt
+index 7a9c40e..11e426e 100644
+--- a/examples/arkode/F77_serial/CMakeLists.txt
++++ b/examples/arkode/F77_serial/CMakeLists.txt
+@@ -39,18 +39,9 @@ SET(FARKODE_examples_BL
+ SET(ARKODE_extras
+ )
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECS_LIB sundials_nvecserial_static)
+- SET(FNVECS_LIB sundials_fnvecserial_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECS_LIB sundials_nvecserial_shared)
+- SET(FNVECS_LIB sundials_fnvecserial_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECS_LIB sundials_nvecserial)
++SET(FNVECS_LIB sundials_fnvecserial)
+
+ # Only static FCMIX libraries are available
+
+diff --git a/examples/arkode/F90_parallel/CMakeLists.txt b/examples/arkode/F90_parallel/CMakeLists.txt
+index fca2903..cadec82 100644
+--- a/examples/arkode/F90_parallel/CMakeLists.txt
++++ b/examples/arkode/F90_parallel/CMakeLists.txt
+@@ -44,17 +44,9 @@ ELSE(MPI_MPIF90)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
+ ENDIF(MPI_MPIF90)
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECP_LIB sundials_nvecparallel_static)
+- SET(FNVECP_LIB sundials_fnvecparallel_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECP_LIB sundials_nvecparallel_shared)
+- SET(FNVECP_LIB sundials_fnvecparallel_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECP_LIB sundials_nvecparallel)
++SET(FNVECP_LIB sundials_fnvecparallel)
+
+ # Only static FCMIX libraries are available
+ SET(FARKODE_LIB sundials_farkode_static)
+diff --git a/examples/arkode/F90_serial/CMakeLists.txt b/examples/arkode/F90_serial/CMakeLists.txt
+index 62e01db..f33a24f 100644
+--- a/examples/arkode/F90_serial/CMakeLists.txt
++++ b/examples/arkode/F90_serial/CMakeLists.txt
+@@ -47,18 +47,9 @@ SET(ARKODE_extras
+ plot_brusselator1D_FEM.py
+ )
+
+-# Specify libraries to link against (through the target that was used to
+-# generate them) based on the value of the variable LINK_LIBRARY_TYPE
+-
+-IF(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_static)
+- SET(NVECS_LIB sundials_nvecserial_static)
+- SET(FNVECS_LIB sundials_fnvecserial_static)
+-ELSE(LINK_LIBRARY_TYPE MATCHES "static")
+- SET(ARKODE_LIB sundials_arkode_shared)
+- SET(NVECS_LIB sundials_nvecserial_shared)
+- SET(FNVECS_LIB sundials_fnvecserial_shared)
+-ENDIF(LINK_LIBRARY_TYPE MATCHES "static")
++SET(ARKODE_LIB sundials_arkode)
++SET(NVECS_LIB sundials_nvecserial)
++SET(FNVECS_LIB sundials_fnvecserial)
+
+ # Only static FCMIX libraries are available
+
diff --git a/debian/patches/0005-arkode-examples-don-t-call-SUNDIALS_ADD_TEST.patch b/debian/patches/0005-arkode-examples-don-t-call-SUNDIALS_ADD_TEST.patch
new file mode 100644
index 0000000..ae9e13a
--- /dev/null
+++ b/debian/patches/0005-arkode-examples-don-t-call-SUNDIALS_ADD_TEST.patch
@@ -0,0 +1,201 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sun, 2 Apr 2017 19:29:38 -0700
+Subject: arkode examples: don't call SUNDIALS_ADD_TEST()
+
+This should be applied to ALL examples. These examples should be buildable from
+/usr/share/doc/libsundials-something. The CMakeLists files are written to build
+them at BUILD time, but I want to already assume that the packages are installed
+and use those
+
+Here the CMakeLists are calling some function that's only useful to use the
+examples as tests, not as examples. This function isn't available in the EXAMPLE
+CMakeLists files, and I don't need it anyway, so I remove the calls
+---
+ examples/arkode/CXX_parallel/CMakeLists.txt | 1 -
+ examples/arkode/CXX_serial/CMakeLists.txt | 2 --
+ examples/arkode/C_openmp/CMakeLists.txt | 1 -
+ examples/arkode/C_parallel/CMakeLists.txt | 1 -
+ examples/arkode/C_parhyp/CMakeLists.txt | 1 -
+ examples/arkode/C_serial/CMakeLists.txt | 4 ----
+ examples/arkode/F77_parallel/CMakeLists.txt | 1 -
+ examples/arkode/F77_serial/CMakeLists.txt | 2 --
+ examples/arkode/F90_parallel/CMakeLists.txt | 1 -
+ examples/arkode/F90_serial/CMakeLists.txt | 3 ---
+ 10 files changed, 17 deletions(-)
+
+diff --git a/examples/arkode/CXX_parallel/CMakeLists.txt b/examples/arkode/CXX_parallel/CMakeLists.txt
+index 894edec..c0b6f09 100644
+--- a/examples/arkode/CXX_parallel/CMakeLists.txt
++++ b/examples/arkode/CXX_parallel/CMakeLists.txt
+@@ -69,7 +69,6 @@ ENDIF(SUPERLUMT_FOUND)
+ FOREACH(example ${ARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.cpp)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(NOT MPI_MPICXX)
+ TARGET_LINK_LIBRARIES(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES})
+diff --git a/examples/arkode/CXX_serial/CMakeLists.txt b/examples/arkode/CXX_serial/CMakeLists.txt
+index d64dd81..a23c451 100644
+--- a/examples/arkode/CXX_serial/CMakeLists.txt
++++ b/examples/arkode/CXX_serial/CMakeLists.txt
+@@ -61,7 +61,6 @@ ENDIF(SUPERLUMT_FOUND)
+ FOREACH(example ${ARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.cpp)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.cpp ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_serial)
+@@ -74,7 +73,6 @@ IF(LAPACK_FOUND)
+ FOREACH(example ${ARKODE_examples_BL})
+ ADD_EXECUTABLE(${example} ${example}.cpp)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.cpp ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/CXX_serial)
+diff --git a/examples/arkode/C_openmp/CMakeLists.txt b/examples/arkode/C_openmp/CMakeLists.txt
+index ccc55f1..79d2ba6 100644
+--- a/examples/arkode/C_openmp/CMakeLists.txt
++++ b/examples/arkode/C_openmp/CMakeLists.txt
+@@ -60,7 +60,6 @@ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}")
+ FOREACH(example ${ARKODE_examples_OMP})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example} TEST_ARGS 4)
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_openmp)
+diff --git a/examples/arkode/C_parallel/CMakeLists.txt b/examples/arkode/C_parallel/CMakeLists.txt
+index 9e61de0..71acc2b 100644
+--- a/examples/arkode/C_parallel/CMakeLists.txt
++++ b/examples/arkode/C_parallel/CMakeLists.txt
+@@ -69,7 +69,6 @@ FOREACH(example_tuple ${ARKODE_examples})
+ # first item is example
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example} MPI_NPROCS ${number_of_tasks})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(NOT MPI_MPICC)
+ TARGET_LINK_LIBRARIES(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES})
+diff --git a/examples/arkode/C_parhyp/CMakeLists.txt b/examples/arkode/C_parhyp/CMakeLists.txt
+index b224b84..8775ec1 100644
+--- a/examples/arkode/C_parhyp/CMakeLists.txt
++++ b/examples/arkode/C_parhyp/CMakeLists.txt
+@@ -70,7 +70,6 @@ FOREACH(example_tuple ${ARKODE_examples})
+ # first item is example
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example} MPI_NPROCS ${number_of_tasks})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ TARGET_LINK_LIBRARIES(${example} ${HYPRE_LIBS})
+ IF(NOT MPI_MPICC)
+diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt
+index 3985a4f..235aada 100644
+--- a/examples/arkode/C_serial/CMakeLists.txt
++++ b/examples/arkode/C_serial/CMakeLists.txt
+@@ -89,7 +89,6 @@ ENDIF(SUPERLUMT_FOUND)
+ FOREACH(example ${ARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial)
+@@ -102,7 +101,6 @@ IF(LAPACK_FOUND)
+ FOREACH(example ${ARKODE_examples_BL})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial)
+@@ -116,7 +114,6 @@ IF(KLU_FOUND)
+ FOREACH(example ${ARKODE_examples_KLU})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial)
+@@ -130,7 +127,6 @@ IF(SUPERLUMT_FOUND)
+ FOREACH(example ${ARKODE_examples_SUPERLUMT})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial)
+diff --git a/examples/arkode/F77_parallel/CMakeLists.txt b/examples/arkode/F77_parallel/CMakeLists.txt
+index b9fd85b..77e56a5 100644
+--- a/examples/arkode/F77_parallel/CMakeLists.txt
++++ b/examples/arkode/F77_parallel/CMakeLists.txt
+@@ -77,7 +77,6 @@ FOREACH(example_tuple ${FARKODE_examples})
+ # first item is example
+ ADD_EXECUTABLE(${example} ${example}.f)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example} MPI_NPROCS ${number_of_tasks})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(NOT MPI_MPIF77)
+ TARGET_LINK_LIBRARIES(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES})
+diff --git a/examples/arkode/F77_serial/CMakeLists.txt b/examples/arkode/F77_serial/CMakeLists.txt
+index 11e426e..68e828f 100644
+--- a/examples/arkode/F77_serial/CMakeLists.txt
++++ b/examples/arkode/F77_serial/CMakeLists.txt
+@@ -67,7 +67,6 @@ ENDIF(SUPERLUMT_FOUND)
+ FOREACH(example ${FARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.f)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.f ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial)
+@@ -80,7 +79,6 @@ IF(LAPACK_FOUND)
+ FOREACH(example ${FARKODE_examples_BL})
+ ADD_EXECUTABLE(${example} ${example}.f)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.f ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F77_serial)
+diff --git a/examples/arkode/F90_parallel/CMakeLists.txt b/examples/arkode/F90_parallel/CMakeLists.txt
+index cadec82..9bcb2c8 100644
+--- a/examples/arkode/F90_parallel/CMakeLists.txt
++++ b/examples/arkode/F90_parallel/CMakeLists.txt
+@@ -73,7 +73,6 @@ FOREACH(example_tuple ${FARKODE_examples})
+ # first item is example
+ ADD_EXECUTABLE(${example} ${example}.f90)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example} MPI_NPROCS ${number_of_tasks})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(NOT MPI_MPIF90)
+ TARGET_LINK_LIBRARIES(${example} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARIES})
+diff --git a/examples/arkode/F90_serial/CMakeLists.txt b/examples/arkode/F90_serial/CMakeLists.txt
+index f33a24f..82f33e0 100644
+--- a/examples/arkode/F90_serial/CMakeLists.txt
++++ b/examples/arkode/F90_serial/CMakeLists.txt
+@@ -75,7 +75,6 @@ ENDIF(SUPERLUMT_FOUND)
+ FOREACH(example ${FARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.f90)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.f90 ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial)
+@@ -88,7 +87,6 @@ IF(LAPACK_FOUND)
+ FOREACH(example ${FARKODE_examples_BL})
+ ADD_EXECUTABLE(${example} ${example}.f90)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.f90 ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial)
+@@ -102,7 +100,6 @@ IF(KLU_FOUND)
+ FOREACH(example ${FARKODE_examples_KLU})
+ ADD_EXECUTABLE(${example} ${example}.f90)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+- SUNDIALS_ADD_TEST(${example} ${example})
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.f90 ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F90_serial)
diff --git a/debian/patches/0006-example-added-forgotten-library-linkage.patch b/debian/patches/0006-example-added-forgotten-library-linkage.patch
new file mode 100644
index 0000000..38566f9
--- /dev/null
+++ b/debian/patches/0006-example-added-forgotten-library-linkage.patch
@@ -0,0 +1,20 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sun, 2 Apr 2017 19:30:16 -0700
+Subject: example: added forgotten library linkage
+
+---
+ examples/arkode/C_serial/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/examples/arkode/C_serial/CMakeLists.txt b/examples/arkode/C_serial/CMakeLists.txt
+index 235aada..d03b645 100644
+--- a/examples/arkode/C_serial/CMakeLists.txt
++++ b/examples/arkode/C_serial/CMakeLists.txt
+@@ -90,6 +90,7 @@ FOREACH(example ${ARKODE_examples})
+ ADD_EXECUTABLE(${example} ${example}.c)
+ SET_TARGET_PROPERTIES(${example} PROPERTIES FOLDER "Examples")
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS})
++ TARGET_LINK_LIBRARIES(${example} -lm)
+ IF(EXAMPLES_INSTALL)
+ INSTALL(FILES ${example}.c ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/C_serial)
+ ENDIF(EXAMPLES_INSTALL)
diff --git a/debian/patches/0007-arkode-library-now-links-with-libklu.patch b/debian/patches/0007-arkode-library-now-links-with-libklu.patch
new file mode 100644
index 0000000..1fab6aa
--- /dev/null
+++ b/debian/patches/0007-arkode-library-now-links-with-libklu.patch
@@ -0,0 +1,24 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sun, 2 Apr 2017 19:30:55 -0700
+Subject: arkode library now links with libklu
+
+arkode uses liblku symbols, so it should link against it
+---
+ src/arkode/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/arkode/CMakeLists.txt b/src/arkode/CMakeLists.txt
+index 4bc9e54..a92f4f8 100644
+--- a/src/arkode/CMakeLists.txt
++++ b/src/arkode/CMakeLists.txt
+@@ -138,6 +138,10 @@ IF(BUILD_SHARED_LIBS)
+ ADD_LIBRARY(sundials_arkode_shared SHARED
+ ${arkode_SOURCES} ${arkode_BL_SOURCES} ${shared_SOURCES})
+
++ IF(KLU_FOUND)
++ TARGET_LINK_LIBRARIES(sundials_arkode_shared -lklu)
++ ENDIF(KLU_FOUND)
++
+ # Set the library name and make sure it is not deleted
+ SET_TARGET_PROPERTIES(sundials_arkode_shared
+ PROPERTIES OUTPUT_NAME sundials_arkode CLEAN_DIRECT_OUTPUT 1)
diff --git a/debian/patches/series b/debian/patches/series
index 08c7109..db3fd66 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
0001-Added-missing-linkages-to-the-DSOs.patch
0002-Fix-library-paths-for-multiarch.patch
-0004-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
+0003-Improve-FindPETSc-to-use-pkg-config-where-possible.patch
+0004-arkode-examples-use-default-sundials-libraries.patch
+0005-arkode-examples-don-t-call-SUNDIALS_ADD_TEST.patch
+0006-example-added-forgotten-library-linkage.patch
+0007-arkode-library-now-links-with-libklu.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sundials.git
More information about the debian-science-commits
mailing list