CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.95k stars 1.38k forks source link

Compilation with missing depencies, e.g. Eigen3 #8403

Open soesau opened 2 months ago

soesau commented 2 months ago

Some functions have hard dependencies and the handling in case the dependency is not present is inconsistent in the code.

Examples: Fixed_border_parameterizer_3 or Orbifold_Tutte_parameterizer_3 take a solver as template parameter and default to eigen3. If not available, a static_assert stops compilation with an error message.

extract_mean_curvature_flow_skeleton and scanline_orient_normals are only visible if eigen3 is available.

Code using Surface_mesh_deformation fail to compile, but will not produce a meaningful error message.

What would be the best way to handle it? Failing compilation with a meaningful error message seems most useful.

afabri commented 5 days ago

@sloriot do you have an opinion on this question?

sloriot commented 5 days ago

I think the initial rational was that a default using Eigen should be available only if Eigen was detected (with CGAL_USE_EIGEN being defined). The assertion mechanism is the more convenient for the user I think.