Installation: Don't insist on providing GMP (#8893)

## Summary of Changes

Removed error when GMP is not found.

## Release Management

* Affected package(s): Installation
* Issues: fix #8852
This commit is contained in:
Sebastien Loriot 2025-05-26 11:34:04 +02:00 committed by GitHub
commit b8d043ff76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 37 additions and 7 deletions

View File

@ -21,9 +21,18 @@ set(CGAL_SetupGMP_included TRUE)
# That is required to find the FindGMP and FindMPFR modules.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CGAL_MODULES_DIR})
find_package(GMP REQUIRED)
find_package(MPFR REQUIRED)
find_package(GMP QUIET)
find_package(MPFR QUIET)
if (GMP_FOUND)
find_package(GMPXX QUIET)
endif()
if(NOT GMP_FOUND OR NOT MPFR_FOUND)
message(STATUS "GMP not found.")
set(CGAL_DISABLE_GMP ON)
return()
endif()
if(NOT GMPXX_FOUND)
option(CGAL_WITH_GMPXX "Use CGAL with GMPXX: use C++ classes of GNU MP instead of CGAL wrappers" OFF)

View File

@ -115,6 +115,19 @@ requirements.
To use these classes, \gmp and \mpfr must be installed.
\section Number_typesBoost Number Types Provided by Boost
\anchor boostnt
Boost provides arbitrary precision integer and rational number types.
The number types `boost::multiprecision::gmp_int` and `boost::multiprecision::gmp_rational`
have \gmp as backend, while the number types `boost::multiprecision::cpp_int`
and `boost::multiprecision::cpp_rational` have a native backend.
The file <TT>CGAL/boost_mp.h</TT> provides the functions to make
these classes models of number type concepts.
\section Number_typesLEDA Number Types Provided by LEDA
\anchor ledant

View File

@ -9,6 +9,9 @@
/// \defgroup nt_core CORE
/// \ingroup PkgNumberTypesRef
/// \defgroup nt_boost Boost
/// \ingroup PkgNumberTypesRef
/// \defgroup nt_leda LEDA
/// \ingroup PkgNumberTypesRef
@ -71,6 +74,13 @@
- `leda_bigfloat`
- `leda_real`
\cgalCRPSubsection{Boost}
- `boost::multiprecision::cpp_int`
- `boost::multiprecision::cpp_rational`
- `boost::multiprecision::gmp_int`
- `boost::multiprecision::gmp_rational`
\cgalCRPSubsection{GMP}
- `mpz_class`

View File

@ -27,8 +27,7 @@ namespace CGAL {
`Exact_integer` is an exact integer number type.
It is a typedef of another number type. Its exact definition depends on
the availability the third-party libraries \gmp, \core, and \leda. \cgal must
be configured with at least one of those libraries.
the availability the third-party libraries \gmp and \leda.
\cgalModels{EuclideanRing,RealEmbeddable}

View File

@ -27,8 +27,7 @@ namespace CGAL {
`Exact_rational` is an exact rational number type, constructible from `double`.
It is a typedef of another number type. Its exact definition depends on
the availability the third-party libraries \gmp, \core, and \leda. \cgal must
be configured with at least one of those libraries.
the availability the third-party libraries \gmp and \leda.
\cgalModels{Field,RealEmbeddable,Fraction,FromDoubleConstructible}