vcpkg/ports/cgal/x86_windows.patch
Laurent Rineau b73601a461
[cgal] update to 5.6 (#32896)
* [cgal] update to 5.6

adds a patch:
  - do not use Boost MP number type on Windows x86 (32 bits)

* vcpkg x-add-version --all

* update the patch

* vcpkg x-add-version --all
2023-08-10 12:33:11 -07:00

25 lines
1.0 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/Number_types/include/CGAL/boost_mp.h b/Number_types/include/CGAL/boost_mp.h
index 3dcaadcad21..b98980acbc5 100644
--- a/Number_types/include/CGAL/boost_mp.h
+++ b/Number_types/include/CGAL/boost_mp.h
@@ -20,8 +20,18 @@
// easy solution.
// MSVC had trouble with versions <= 1.69:
// https://github.com/boostorg/multiprecision/issues/98
+//
+// Disable also on Windows 32 bits
+// because CGAL/cpp_float.h assumes _BitScanForward64 is available
+// See https://learn.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64
+//
+// Disable also with PowerPC processors, with Boost<1.80 because of that bug:
+// https://github.com/boostorg/multiprecision/pull/421
+//
#if !defined CGAL_DO_NOT_USE_BOOST_MP && \
- (!defined _MSC_VER || BOOST_VERSION >= 107000)
+ (!defined _MSC_VER || BOOST_VERSION >= 107000) && \
+ (!defined _WIN32 || defined _WIN64) && \
+ (BOOST_VERSION >= 108000 || (!defined _ARCH_PPC && !defined _ARCH_PPC64))
#define CGAL_USE_BOOST_MP 1
#include <CGAL/Quotient.h>