Skip to content

Commit

Permalink
SuiteSparse: update to v1.6.1 (SuiteSparse v5.4.0), with METIS and OP…
Browse files Browse the repository at this point in the history
…ENBLAS (#642)

Starting with this new version change the default of BUILD_METIS to ON.
This enables new Cholmod based orderings in the upcoming
ceres-solver v2.2 release.

Also build against OpenBLAS per default. OpenBLAS v0.3.21 provides a
f2c-converted LAPACK v3.9.0 copy, which is used when building without a
Fortran compiler. This enables us to have a C++ only build, making
static libraries easier (no fortran runtime libs anymore).
  • Loading branch information
NeroBurner authored Dec 12, 2022
1 parent eb50493 commit ae41821
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ hunter_default_version(SimpleSignal VERSION 0.0.0-79c3f68-p1)
hunter_default_version(Snappy VERSION 1.1.7)
hunter_default_version(Sober VERSION 0.1.3)
hunter_default_version(Sqlpp11 VERSION 0.57-p0)
hunter_default_version(SuiteSparse VERSION 5.1.2-p0)
hunter_default_version(SuiteSparse VERSION 5.4.0)
hunter_default_version(TCLAP VERSION 1.2.2-p1)
hunter_default_version(TIFF VERSION 4.0.2-p5)
hunter_default_version(Tesseract VERSION 3.05.01-hunter-3)
Expand Down
25 changes: 24 additions & 1 deletion cmake/projects/SuiteSparse/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,35 @@ hunter_add_version(
SHA1
6ea701f288a51bc57f1db5918c6b0879d800ed28
)
## suitesparse-metis-for-windows version is 1.6.0
## suitesparse library version is 5.4.0
hunter_add_version(
PACKAGE_NAME
SuiteSparse
VERSION
"5.4.0"
URL
"https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/refs/tags/v1.6.1.tar.gz"
SHA1
d3131ac76330981150619b05664a75ade58da947
)

if(HUNTER_SuiteSparse_VERSION VERSION_LESS 5.4.0)
set(_SuiteSparse_BUILD_METIS NO)
set(_SuiteSparse_WITH_OPENBLAS NO)
else()
# starting with tag v1.6.0 (SuiteSparse 5.4.0) build with metis support
set(_SuiteSparse_BUILD_METIS YES)
# and build against OpenBLAS, which starting with v0.3.21 provides a
# f2c-converted LAPACK v3.9.0 implementation, making the build C++ only
set(_SuiteSparse_WITH_OPENBLAS YES)
endif()

hunter_cmake_args(
SuiteSparse
CMAKE_ARGS
BUILD_METIS=NO
BUILD_METIS=${_SuiteSparse_BUILD_METIS}
WITH_OPENBLAS=${_SuiteSparse_WITH_OPENBLAS}
HUNTER_INSTALL_LICENSE_FILES=LICENSE.md
)

Expand Down
5 changes: 4 additions & 1 deletion examples/SuiteSparse-dynLAPACK/config.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
hunter_config(LAPACK
VERSION ${HUNTER_LAPACK_VERSION}
CMAKE_ARGS BUILD_SHARED_LIBS=ON
CMAKE_ARGS
BUILD_SHARED_LIBS=ON
BUILD_METIS=ON
WITH_OPENBLAS=OFF # we want to test generic LAPACK dynamic lib, not OpenBLAS
)

0 comments on commit ae41821

Please sign in to comment.