mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Default SUITESPARSE to OFF due to GPL licensing
Ceres requires the CHOLMOD supernodal factorization and SPQR components of SuiteSparse, which are only available under GPL or commercial terms. Because SuiteSparse was previously autodetected and linked whenever present, a default build could silently become GPL licensed without the user choosing that outcome. Make SuiteSparse support opt-in by defaulting SUITESPARSE to OFF, document the licensing implications in the installation guide. Fixes #1026 Change-Id: I1cfb2148b830a72fa18caadcff76f35a50aeb179
This commit is contained in:
+4
-5
@@ -85,7 +85,7 @@ enable_testing()
|
||||
include(CMakeDependentOption)
|
||||
include(PrettyPrintCMakeList)
|
||||
|
||||
option(SUITESPARSE "Enable SuiteSparse." ON)
|
||||
option(SUITESPARSE "Enable SuiteSparse." OFF)
|
||||
if (APPLE)
|
||||
option(ACCELERATESPARSE
|
||||
"Enable use of sparse solvers in Apple's Accelerate framework." ON)
|
||||
@@ -407,16 +407,15 @@ endif (LAPACK)
|
||||
set(RELATIVE_CMAKECONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/Ceres)
|
||||
|
||||
if (SUITESPARSE)
|
||||
# By default, if SuiteSparse and all dependencies are found, Ceres is
|
||||
# built with SuiteSparse support.
|
||||
# SuiteSparse support is opt-in and was explicitly requested. If it and
|
||||
# all of its dependencies are found, Ceres is built with SuiteSparse
|
||||
# support.
|
||||
|
||||
# Check for SuiteSparse and dependencies.
|
||||
find_package(SuiteSparse 4.5.6 COMPONENTS CHOLMOD SPQR
|
||||
OPTIONAL_COMPONENTS Partition)
|
||||
if (SuiteSparse_FOUND)
|
||||
set(SuiteSparse_DEPENDENCY "find_dependency(SuiteSparse ${SuiteSparse_VERSION})")
|
||||
# By default, if all of SuiteSparse's dependencies are found, Ceres is
|
||||
# built with SuiteSparse support.
|
||||
message("-- Found SuiteSparse ${SuiteSparse_VERSION}, "
|
||||
"building with SuiteSparse.")
|
||||
|
||||
|
||||
@@ -629,15 +629,19 @@ Options controlling Ceres configuration
|
||||
note that if ``LAPACK=ON`` and ``SUITESPARSE=ON``, the ``LAPACK`` and
|
||||
``BLAS`` libraries used by SuiteSparse and Ceres should be the same.
|
||||
|
||||
#. ``SUITESPARSE [Default: ON]``: By default, Ceres will link to
|
||||
``SuiteSparse`` if it and all of its dependencies are present. Turn
|
||||
this ``OFF`` to build Ceres without ``SuiteSparse``.
|
||||
#. ``SUITESPARSE [Default: OFF]``: SuiteSparse support is opt-in. Turn this
|
||||
``ON`` to link Ceres against ``SuiteSparse``, provided it and all of its
|
||||
dependencies are present.
|
||||
|
||||
.. NOTE::
|
||||
.. WARNING::
|
||||
|
||||
SuiteSparse is licensed under a mixture of GPL/LGPL/Commercial
|
||||
terms. Ceres requires some components that are only licensed under
|
||||
GPL/Commercial terms.
|
||||
SuiteSparse is licensed under a mixture of GPL/LGPL/Commercial terms.
|
||||
Ceres requires the CHOLMOD supernodal factorization and SPQR components,
|
||||
which are only available under GPL/Commercial terms. Consequently, unless
|
||||
you hold a commercial SuiteSparse license, a Ceres build with
|
||||
``SUITESPARSE=ON`` is GPL licensed. This is why SuiteSparse support is
|
||||
opt-in rather than enabled by default. Obtaining a commercial SuiteSparse
|
||||
license removes this restriction.
|
||||
|
||||
#. ``ACCELERATESPARSE [Default: ON]``: By default, Ceres will link to
|
||||
Apple's Accelerate framework directly if a version of it is detected
|
||||
|
||||
@@ -20,6 +20,14 @@ Bug Fixes & Minor Changes
|
||||
#. Clarify building Ceres Solver from Git sources in the installation
|
||||
documentation.
|
||||
|
||||
Backward Incompatible API Changes
|
||||
---------------------------------
|
||||
|
||||
#. The ``SUITESPARSE`` CMake option now defaults to ``OFF``. Passing
|
||||
``-DSUITESPARSE=ON`` restores the previous behavior, but makes the
|
||||
resulting Ceres build GPL licensed unless you hold a commercial
|
||||
SuiteSparse license.
|
||||
|
||||
2.2.0
|
||||
=====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user