mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Move discussion of dependency licensing to Sphinx docs.
- Also enable EIGENSPARSE option by default as LGPL licensing implications are less severe that SuiteSparse’s GPL implications which is enabled by default. Change-Id: Ic7e4fef5cef614d5ce719eeefcc35bf4b63b8dac
This commit is contained in:
committed by
Sameer Agarwal
parent
89e53b4ec3
commit
aab0193c7b
+7
-25
@@ -107,14 +107,8 @@ option(OPENMP "Enable threaded solving in Ceres (requires OpenMP)" ON)
|
||||
# Multithreading using TBB
|
||||
option(TBB "Enable threaded solving in Ceres with TBB (requires TBB and C++11)" OFF)
|
||||
# Enable the use of Eigen as a sparse linear algebra library for
|
||||
# solving the nonlinear least squares problems. Enabling this
|
||||
# option will result in an LGPL licensed version of Ceres Solver
|
||||
# as the Simplicial Cholesky factorization in Eigen is licensed under the LGPL.
|
||||
# This does not affect the covariance estimation algorithm, as it
|
||||
# depends on the sparse QR factorization algorithm, which is licensed
|
||||
# under the MPL.
|
||||
OPTION(EIGENSPARSE
|
||||
"Enable Eigen as a sparse linear algebra library, WARNING: results in an LGPL licensed Ceres." OFF)
|
||||
# solving the nonlinear least squares problems.
|
||||
option(EIGENSPARSE "Enable Eigen as a sparse linear algebra library." ON)
|
||||
if (NOT MSVC)
|
||||
# Ceres does not use C++11 internally, however it does use shared_ptr
|
||||
# (required) and unordered_map (if available), both of which were present in
|
||||
@@ -213,35 +207,23 @@ if (EIGEN_FOUND)
|
||||
"that Eigen/SparseCore be available, detected version of Eigen is: "
|
||||
"${EIGEN_VERSION}")
|
||||
endif (EIGEN_VERSION VERSION_LESS 3.1.0)
|
||||
|
||||
message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}")
|
||||
# Ensure that only MPL2 licensed code is part of the default build.
|
||||
message("")
|
||||
message(" ===============================================================")
|
||||
if (EIGENSPARSE)
|
||||
message("-- Enabling use of Eigen as a sparse linear algebra library.")
|
||||
list(APPEND CERES_COMPILE_OPTIONS CERES_USE_EIGEN_SPARSE)
|
||||
message(" Enabling the use of Eigen as a sparse linear algebra library ")
|
||||
message(" for solving the nonlinear least squares problems. Enabling ")
|
||||
message(" this option results in an LGPL licensed version of ")
|
||||
message(" Ceres Solver as the Simplicial Cholesky factorization in Eigen")
|
||||
message(" is licensed under the LGPL. ")
|
||||
|
||||
if (EIGEN_VERSION VERSION_LESS 3.2.2)
|
||||
message(" WARNING:")
|
||||
message("")
|
||||
message(" Your version of Eigen is older than version 3.2.2.")
|
||||
message(" The performance of SPARSE_NORMAL_CHOLESKY and SPARSE_SCHUR")
|
||||
message(" linear solvers will suffer. ")
|
||||
message(" Your version of Eigen (${EIGEN_VERSION}) is older than ")
|
||||
message(" version 3.2.2. The performance of SPARSE_NORMAL_CHOLESKY ")
|
||||
message(" and SPARSE_SCHUR linear solvers will suffer.")
|
||||
endif (EIGEN_VERSION VERSION_LESS 3.2.2)
|
||||
|
||||
else (EIGENSPARSE)
|
||||
message(" Disabling the use of Eigen as a sparse linear algebra library.")
|
||||
message("-- Disabling use of Eigen as a sparse linear algebra library.")
|
||||
message(" This does not affect the covariance estimation algorithm ")
|
||||
message(" which can still use the EIGEN_SPARSE_QR algorithm.")
|
||||
add_definitions(-DEIGEN_MPL2_ONLY)
|
||||
endif (EIGENSPARSE)
|
||||
message(" ===============================================================")
|
||||
message("")
|
||||
endif (EIGEN_FOUND)
|
||||
|
||||
if (LAPACK)
|
||||
|
||||
@@ -566,6 +566,8 @@ defaults if you know what you are doing.
|
||||
``CMake`` GUI. If they are not present in the *Standard View*,
|
||||
toggle to the *Advanced View* with ``<t>``.
|
||||
|
||||
.. _options-controlling-ceres-configuration:
|
||||
|
||||
Options controlling Ceres configuration
|
||||
---------------------------------------
|
||||
|
||||
@@ -582,20 +584,32 @@ Options controlling Ceres configuration
|
||||
``SuiteSparse`` if it and all of its dependencies are present. Turn
|
||||
this ``OFF`` to build Ceres without ``SuiteSparse``.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
SuiteSparse is licensed under a mixture of GPL/LGPL/Commercial
|
||||
terms. Ceres requires some components that are only licensed under
|
||||
GPL/Commercial terms.
|
||||
|
||||
#. ``CXSPARSE [Default: ON]``: By default, Ceres will link to
|
||||
``CXSparse`` if all its dependencies are present. Turn this ``OFF``
|
||||
to build Ceres without ``CXSparse``.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
CXSparse is licensed under the LGPL.
|
||||
|
||||
#. ``EIGENSPARSE [Default: OFF]``: By default, Ceres will not use
|
||||
Eigen's sparse Cholesky factorization. The is because this part of
|
||||
the code is licensed under the ``LGPL`` and since ``Eigen`` is a
|
||||
header only library, including this code will result in an ``LGPL``
|
||||
licensed version of Ceres.
|
||||
Eigen's sparse Cholesky factorization.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
For good performance, use Eigen version 3.2.2 or later.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
Unlike the rest of Eigen (>= 3.1.1 MPL2, < 3.1.1 LGPL), Eigen's sparse
|
||||
Cholesky factorization is (still) licensed under the LGPL.
|
||||
|
||||
#. ``GFLAGS [Default: ON]``: Turn this ``OFF`` to build Ceres without
|
||||
``gflags``. This will also prevent some of the example code from
|
||||
building.
|
||||
@@ -618,6 +632,12 @@ Options controlling Ceres configuration
|
||||
#. ``TBB [Default: OFF]``: An alternative to ``OpenMP`` threading library that
|
||||
requires C++11. This option is mutually exclusive to ``OpenMP``.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
Up to and including version 4.4, TBB was licensed under
|
||||
GPL/Commercial terms. From 2017.x versions onwards, TBB is licensed under
|
||||
the Apache 2.0 license (and commerical terms).
|
||||
|
||||
#. ``CXX11 [Default: OFF]`` *Non-MSVC compilers only*.
|
||||
|
||||
Although Ceres does not currently require C++11, it does use
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
License
|
||||
=======
|
||||
|
||||
.. NOTE::
|
||||
|
||||
This page refers only to the license for Ceres itself, independent of its
|
||||
optional dependencies which are separately licensed and which can affect
|
||||
the resulting license of Ceres if built with them enabled. See
|
||||
:ref:`options-controlling-ceres-configuration` for an overview of these
|
||||
implications.
|
||||
|
||||
Ceres Solver is licensed under the New BSD license, whose terms are as follows.
|
||||
|
||||
Copyright 2016 Google Inc. All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user