Is your feature request related to a problem? Please describe.
The cgal port currently depends unconditionally on gmp and mpfr.
CGAL itself supports a Boost.Multiprecision exact-number backend, so consumers
that only need CGAL's exact predicates cannot currently remove these two native
dependencies through manifest features.
CGAL documents Boost.Multiprecision as an alternative exact-number backend:
https://doc.cgal.org/latest/Manual/thirdparty.html#thirdpartyBoostMp
Proposed solution
Make GMP/MPFR an optional default feature of the cgal port:
- add a feature such as
gmp;
- include that feature in
default-features, preserving the port's current
behavior;
- move the
gmp and mpfr dependencies into that feature; and
- when the feature is disabled, configure CGAL with:
CGAL_DISABLE_GMP=ON
CGAL_CMAKE_EXACT_NT_BACKEND=BOOST_BACKEND
A Boost-only manifest consumer could then use:
{
"dependencies": [
{
"name": "cgal",
"default-features": false
}
]
}
The existing default would continue to install and select GMP/MPFR, so this
should be backward compatible for current consumers.
Validation
I tested this port shape against vcpkg baseline
9e593bb18ea69cc5095e012465dcd675a822ed0d with CGAL 6.2 and Boost 1.91
on arm64 macOS.
The no-default-feature configuration:
- installed CGAL without
gmp or mpfr in the dependency graph;
- compiled with
CGAL_DISABLE_GMP and without CGAL_USE_GMP /
CGAL_USE_MPFR;
- passed an EPICK probe covering an almost-coplanar orientation and
co-spherical 3D Delaunay insertion;
- linked without GMP or MPFR dynamic libraries; and
- passed a downstream project's 127-test suite and produced byte-identical
canonical reference fixtures versus the default CGAL backend.
This validation is currently limited to arm64 macOS; the normal vcpkg CI
matrix would still be needed for the port change.
I would be happy to prepare a PR if maintainers agree with the feature shape
(including the preferred feature name).
Is your feature request related to a problem? Please describe.
The
cgalport currently depends unconditionally ongmpandmpfr.CGAL itself supports a Boost.Multiprecision exact-number backend, so consumers
that only need CGAL's exact predicates cannot currently remove these two native
dependencies through manifest features.
CGAL documents Boost.Multiprecision as an alternative exact-number backend:
https://doc.cgal.org/latest/Manual/thirdparty.html#thirdpartyBoostMp
Proposed solution
Make GMP/MPFR an optional default feature of the
cgalport:gmp;default-features, preserving the port's currentbehavior;
gmpandmpfrdependencies into that feature; andCGAL_DISABLE_GMP=ONCGAL_CMAKE_EXACT_NT_BACKEND=BOOST_BACKENDA Boost-only manifest consumer could then use:
{ "dependencies": [ { "name": "cgal", "default-features": false } ] }The existing default would continue to install and select GMP/MPFR, so this
should be backward compatible for current consumers.
Validation
I tested this port shape against vcpkg baseline
9e593bb18ea69cc5095e012465dcd675a822ed0dwith CGAL 6.2 and Boost 1.91on arm64 macOS.
The no-default-feature configuration:
gmpormpfrin the dependency graph;CGAL_DISABLE_GMPand withoutCGAL_USE_GMP/CGAL_USE_MPFR;co-spherical 3D Delaunay insertion;
canonical reference fixtures versus the default CGAL backend.
This validation is currently limited to arm64 macOS; the normal vcpkg CI
matrix would still be needed for the port change.
I would be happy to prepare a PR if maintainers agree with the feature shape
(including the preferred feature name).