From aab0193c7b8e7a747855ec6b03332dba19c078c2 Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Sun, 3 Dec 2017 19:35:05 +0000 Subject: [PATCH] Move discussion of dependency licensing to Sphinx docs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- CMakeLists.txt | 32 +++++++------------------------- docs/source/installation.rst | 28 ++++++++++++++++++++++++---- docs/source/license.rst | 8 ++++++++ 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b28900878..fa070ba81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index bd3c821a0..c95049e92 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -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 ````. +.. _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 diff --git a/docs/source/license.rst b/docs/source/license.rst index 2abbcecb4..a3c55c91b 100644 --- a/docs/source/license.rst +++ b/docs/source/license.rst @@ -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.