mirror of https://github.com/CGAL/cgal
hide a developer friendly way to easily switch with the default exact nt in EPICK/EPECK
This commit is contained in:
parent
924e193603
commit
089fc821c9
|
|
@ -200,3 +200,15 @@ if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE )
|
|||
# Do not use -isystem for CGAL include paths
|
||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||
endif()
|
||||
|
||||
#warning: the order in this list has to match the enum in Exact_type_selector
|
||||
set(CGAL_CMAKE_EXACT_NT_BACKEND_OPTIONS GMP_BACKEND GMPXX_BACKEND BOOST_GMP_BACKEND BOOST_BACKEND LEDA_BACKEND MP_FLOAT_BACKEND Default)
|
||||
set(CGAL_CMAKE_EXACT_NT_BACKEND "Default" CACHE STRING "Setting for advanced users that what to change the default number types used in filtered kernels. Some options might not be working depending on how you configured your build.")
|
||||
#~ set_property(CACHE CGAL_CMAKE_EXACT_NT_BACKEND PROPERTY STRINGS GMP_BACKEND GMPXX_BACKEND BOOST_GMP_BACKEND BOOST_BACKEND LEDA_BACKEND MP_FLOAT_BACKEND)
|
||||
set_property(CACHE CGAL_CMAKE_EXACT_NT_BACKEND PROPERTY STRINGS ${CGAL_CMAKE_EXACT_NT_BACKEND_OPTIONS})
|
||||
|
||||
if ( NOT "${CGAL_CMAKE_EXACT_NT_BACKEND}" STREQUAL "Default" )
|
||||
list(FIND CGAL_CMAKE_EXACT_NT_BACKEND_OPTIONS ${CGAL_CMAKE_EXACT_NT_BACKEND} DEB_VAL)
|
||||
set_target_properties(CGAL PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND=${DEB_VAL}")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace CGAL { namespace internal {
|
|||
// to answer predicates at the end of the filtering chain of predicates and EPECK uses
|
||||
// Exact_field_selector<double> for as its exact number type.
|
||||
|
||||
|
||||
// Warning, the order in this list must match the one in Installation/lib/cmake/CGALConfig.cmake
|
||||
enum ENT_backend_choice
|
||||
{
|
||||
GMP_BACKEND,
|
||||
|
|
@ -132,6 +132,7 @@ struct Exact_NT_backend<MP_FLOAT_BACKEND>
|
|||
typedef MP_Float Integer;
|
||||
};
|
||||
|
||||
#ifndef CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND
|
||||
constexpr ENT_backend_choice Default_exact_nt_backend =
|
||||
#if BOOST_VERSION > 107900 && defined(CGAL_USE_BOOST_MP)
|
||||
BOOST_BACKEND;
|
||||
|
|
@ -150,6 +151,9 @@ constexpr ENT_backend_choice Default_exact_nt_backend =
|
|||
MP_FLOAT_BACKEND;
|
||||
#endif
|
||||
#endif // BOOST_VERSION > 107900
|
||||
#else
|
||||
constexpr ENT_backend_choice Default_exact_nt_backend = static_cast<ENT_backend_choice>(CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND);
|
||||
#endif
|
||||
|
||||
template < typename >
|
||||
struct Exact_field_selector
|
||||
|
|
|
|||
Loading…
Reference in New Issue