From 2223516fe96a9cc31b5e92b5a9a1f114b30e2d79 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 25 Jan 2024 09:38:16 +0100 Subject: [PATCH] SuiteSparse: update to v7.5.1-1 Update the SuiteSparse version to `v7.5.1-1`. This fixes a segementation fault when using ceres-solver solver type `NESDIS`. See: https://github.com/jlblancoc/suitesparse-metis-for-windows/issues/123 Use METIS_IDXTYPEWIDTH=64, as with v7.5.1 SuiteSparse upstream has incorporated Metis sources into the Cholmod module and made it a private dependency with the 64bit width requirement. --- cmake/configs/default.cmake | 2 +- cmake/projects/SuiteSparse/hunter.cmake | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index dd4e978eb3..f359ea3b86 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -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.4.0-2) +hunter_default_version(SuiteSparse VERSION 7.5.1-1) 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) diff --git a/cmake/projects/SuiteSparse/hunter.cmake b/cmake/projects/SuiteSparse/hunter.cmake index 6dab436029..578bee71c1 100644 --- a/cmake/projects/SuiteSparse/hunter.cmake +++ b/cmake/projects/SuiteSparse/hunter.cmake @@ -85,6 +85,17 @@ hunter_add_version( c85cc6149dc44e7d351b5549c6e23a53ff94bc23 ) +hunter_add_version( + PACKAGE_NAME + SuiteSparse + VERSION + "7.5.1-1" + URL + "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/refs/tags/v7.5.1-1.tar.gz" + SHA1 + 82d7c5f577694472a6ba1d7967625c043d4ab816 +) + if(HUNTER_SuiteSparse_VERSION VERSION_LESS 5.4.0) set(_SuiteSparse_BUILD_METIS NO) set(_SuiteSparse_WITH_OPENBLAS NO) @@ -95,13 +106,20 @@ else() # f2c-converted LAPACK v3.9.0 implementation, making the build C++ only set(_SuiteSparse_WITH_OPENBLAS YES) endif() +if(HUNTER_SuiteSparse_VERSION VERSION_LESS 7.5.1) + # since 5.4.0-2, needed for compatibility with ceres-solver 2.2.0 + set(_SuiteSparse_METIS_IDXTYPEWIDTH 32) +else() + # since SuiteSparse 7.5.1-1 metis is internal only and requires 64 bit + set(_SuiteSparse_METIS_IDXTYPEWIDTH 64) +endif() hunter_cmake_args( SuiteSparse CMAKE_ARGS BUILD_METIS=${_SuiteSparse_BUILD_METIS} WITH_OPENBLAS=${_SuiteSparse_WITH_OPENBLAS} - METIS_IDXTYPEWIDTH=32 # since 5.4.0-2, needed for compatibility with ceres-solver 2.2.0 + METIS_IDXTYPEWIDTH=${_SuiteSparse_METIS_IDXTYPEWIDTH} HUNTER_INSTALL_LICENSE_FILES=LICENSE.md )