Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is unclear on how to use non-GMP backend #8606

Open
Chrismarsh opened this issue Nov 13, 2024 · 4 comments
Open

Documentation is unclear on how to use non-GMP backend #8606

Chrismarsh opened this issue Nov 13, 2024 · 4 comments

Comments

@Chrismarsh
Copy link

It is not completely clear how the non-GMP backend should be used in >=6

  1. The manual suggests CGAL_DISABLE_GMP is sufficient. However the manual here suggests CGAL_CMAKE_EXACT_NT_BACKEND must also be set? The issue Ubuntu still requires gmp regardless of CMAKE flags #8567 suggests all of
  SET(CGAL_CMAKE_EXACT_NT_BACKEND BOOST_BACKEND CACHE STRING "")
  SET(CGAL_DISABLE_GMP ON CACHE BOOL "")
  SET(CMAKE_DISABLE_FIND_PACKAGE_GMP ON CACHE BOOL "")

need to be set. Can you clarify?
2. How are non-cmake users of CGAL supposed to handle the CMAKE flags? e.g., if an auto tools code depends on CGAL, how should it handle setting these variables?
3. If CGAL is "installed" via something ike spack, can you confirm that none of this configuration information is cached for subsequent users?

@sloriot
Copy link
Member

sloriot commented Nov 14, 2024

About 3), there is no config info added when you install CGAL (except paths of course).

If you don't want to use cmake you can define CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND to be BOOST_BACKEND and it should work.

About 1) you can use boost multiprecision with GMP backend (BOOST_GMP_BACKEND) or with built-in number type.

@Chrismarsh
Copy link
Author

Thanks for the details. A few follow-up points of clarification:

If you don't want to use cmake you can define CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND to be BOOST_BACKEND and it should work.

Is this an environment variable? I don't see it in the documentation.

Re: 1, to fully disable GMP, is

  SET(CGAL_CMAKE_EXACT_NT_BACKEND BOOST_BACKEND CACHE STRING "")
  SET(CGAL_DISABLE_GMP ON CACHE BOOL "")
  SET(CMAKE_DISABLE_FIND_PACKAGE_GMP ON CACHE BOOL "")

correct?

@sloriot
Copy link
Member

sloriot commented Nov 15, 2024

SET(CMAKE_DISABLE_FIND_PACKAGE_GMP ON CACHE BOOL "") should be sufficient.

@sloriot
Copy link
Member

sloriot commented Nov 15, 2024

CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND is a c++ macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants