config.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Boost.Geometry
  2. // Copyright (c) 2019-2021 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2018-2023 Oracle and/or its affiliates.
  4. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  5. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  6. // Use, modification and distribution is subject to the Boost Software License,
  7. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. #ifndef BOOST_GEOMETRY_CORE_CONFIG_HPP
  10. #define BOOST_GEOMETRY_CORE_CONFIG_HPP
  11. #include <boost/config.hpp>
  12. #include <boost/config/pragma_message.hpp>
  13. // If no define is specified, it uses BOOST_GEOMETRY_NO_ROBUSTNESS, which means: no rescaling.
  14. // (Rescaling was an earlier approach to fix robustness issues.)
  15. // However, if BOOST_GEOMETRY_ROBUSTNESS_ALTERNATIVE is specified, it flips the default.
  16. #if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS) && !defined(BOOST_GEOMETRY_USE_RESCALING)
  17. #if defined(BOOST_GEOMETRY_ROBUSTNESS_ALTERNATIVE)
  18. #define BOOST_GEOMETRY_USE_RESCALING
  19. #else
  20. #define BOOST_GEOMETRY_NO_ROBUSTNESS
  21. #endif
  22. #endif
  23. #if defined(BOOST_GEOMETRY_USE_RESCALING) && ! defined(BOOST_GEOMETRY_ROBUSTNESS_ALTERNATIVE)
  24. BOOST_PRAGMA_MESSAGE("Rescaling is deprecated and its functionality will be removed in Boost 1.84")
  25. #endif
  26. #if defined(BOOST_GEOMETRY_USE_RESCALING) && defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
  27. #error "Define either BOOST_GEOMETRY_NO_ROBUSTNESS (default) or BOOST_GEOMETRY_USE_RESCALING"
  28. #endif
  29. #endif // BOOST_GEOMETRY_CORE_CONFIG_HPP