cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Compilation with missing depencies, e.g. Eigen3

Open soesau opened this issue 1 year ago • 2 comments

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.

soesau avatar Aug 08 '24 09:08 soesau

@sloriot do you have an opinion on this question?

afabri avatar Oct 14 '24 09:10 afabri

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.

sloriot avatar Oct 14 '24 12:10 sloriot

using static assert is a another way to provide clear and immediate feedback during compilation and depending on Eigen3 can be easy and helpful @soesau

debx4 avatar Jan 10 '25 10:01 debx4