File tree Expand file tree Collapse file tree 6 files changed +54
-4
lines changed
ceres-solver-suitesparse-dynLAPACK Expand file tree Collapse file tree 6 files changed +54
-4
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ hunter_default_version(catkin VERSION 0.7.17-p0)
219219hunter_default_version(cctz VERSION 2.2.0)
220220hunter_default_version(ccv VERSION 0.7-p6)
221221hunter_default_version(cereal VERSION 1.2.2-p0)
222- hunter_default_version(ceres-solver VERSION 2.0 .0-p0)
222+ hunter_default_version(ceres-solver VERSION 2.1 .0-p0)
223223hunter_default_version(cgltf VERSION 1.10-f9a8804-p0)
224224hunter_default_version(check_ci_tag VERSION 1.0.0)
225225hunter_default_version(chromium_zlib VERSION 0.0.0-f87c2b10efb4-p0)
Original file line number Diff line number Diff line change @@ -76,13 +76,26 @@ hunter_add_version(
7676 868f7b45b127d4eb2777ce889e0d273bd11f5f73
7777)
7878
79+ hunter_add_version(
80+ PACKAGE_NAME
81+ ceres-solver
82+ VERSION
83+ "2.1.0-p0"
84+ URL
85+ "https://github.com/cpp-pm/ceres-solver/archive/refs/tags/v2.1.0-p0.tar.gz"
86+ SHA1
87+ 315d16137f08ed4b4ee303d505a6355f96b9a3aa
88+ )
89+
7990hunter_cmake_args(ceres-solver CMAKE_ARGS
8091 # explicitly remove dependency on gflags (only needed for tests)
8192 GFLAGS=OFF
8293 # explicitly disable suitesparse support
8394 LAPACK=OFF
8495 SUITESPARSE=OFF
8596 CXSPARSE=OFF # since 1.14.0-p0
97+ # OpenBLAS flag, alternative to LAPACK since v2.1.0-p0
98+ WITH_OPENBLAS=OFF
8699 # don't build tests
87100 BUILD_TESTING=OFF
88101 # also don't build examples: when suitesparse is enabled the examples need Fortran libraries
Original file line number Diff line number Diff line change 22
33 ceres
44 performant
5+ OpenBLAS
6+ Fortran
57
68.. index :: unsorted ; ceres-solver
79
@@ -85,3 +87,25 @@ add a local ``cmake/Hunter/config.cmake`` file with the following contents:
8587
8688 With a dynamic ``LAPACK `` library the ``enable_language(Fortran) `` is not needed.
8789But when shipping your project one must also ship the shared ``LAPACK `` library.
90+
91+ with OpenBLAS as alternative to LAPACK
92+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93+
94+ Since ``v0.3.21 `` ``OpenBLAS `` provides a f2c-converted copy of ``LAPACK `` ``v3.9.0 ``.
95+ This copy is used when building without a Fortran compiler.
96+ Using this in ``ceres-solver `` and ``SuiteSparse `` enables us to build a pure C++ library.
97+ Which means the resulting library can be static with no Fortran runtime dependencies.
98+
99+ Since Hunter `v0.24.9 <https://github.com/cpp-pm/hunter/releases/tag/v0.24.9 >`__
100+ ``SuiteSparse `` per default is built against ``OpenBLAS ``,
101+ which in Hunter per default compiles without Fortran and with ``LAPACK `` enabled.
102+
103+ .. code-block :: cmake
104+
105+ hunter_config(ceres-solver
106+ VERSION ${HUNTER_ceres-solver_VERSION} CMAKE_ARGS
107+ LAPACK=ON
108+ WITH_OPENBLAS=ON # since 2.1.0-p0
109+ SUITESPARSE=ON
110+ CXSPARSE=ON # since 1.14.0-p1
111+ )
Original file line number Diff line number Diff line change 1+ hunter_config(SuiteSparse
2+ VERSION ${HUNTER_SuiteSparse_VERSION}
3+ CMAKE_ARGS
4+ BUILD_METIS=ON
5+ WITH_OPENBLAS=OFF # we want to test generic LAPACK dynamic lib, not OpenBLAS
6+ )
17hunter_config(LAPACK
28 VERSION ${HUNTER_LAPACK_VERSION}
39 CMAKE_ARGS
410 BUILD_SHARED_LIBS =ON
5- BUILD_METIS=ON
6- WITH_OPENBLAS=OFF # we want to test generic LAPACK dynamic lib, not OpenBLAS
711)
Original file line number Diff line number Diff line change @@ -2,7 +2,14 @@ hunter_config(ceres-solver
22 VERSION ${HUNTER_ceres-solver_VERSION} CMAKE_ARGS
33 LAPACK=ON
44 SUITESPARSE=ON
5- CXSPARSE=ON # since 1.14.0-p1
5+ CXSPARSE=OFF # since 1.14.0-p1
6+ WITH_OPENBLAS=OFF # we want to test generic LAPACK dynamic lib, not OpenBLAS
7+ )
8+ hunter_config(SuiteSparse
9+ VERSION ${HUNTER_SuiteSparse_VERSION}
10+ CMAKE_ARGS
11+ BUILD_METIS=ON
12+ WITH_OPENBLAS=OFF # we want to test generic LAPACK dynamic lib, not OpenBLAS
613)
714hunter_config(LAPACK
815 VERSION ${HUNTER_LAPACK_VERSION}
Original file line number Diff line number Diff line change @@ -3,4 +3,6 @@ hunter_config(ceres-solver
33 LAPACK=ON
44 SUITESPARSE=ON
55 CXSPARSE=ON # since 1.14.0-p1
6+ # sine 2.1.0, SuiteSparse 5.4.0 per default builds against OpenBLAS as well
7+ WITH_OPENBLAS=ON
68)
You can’t perform that action at this time.
0 commit comments