Commit: 4749bd227723459097c246aa8a77c74545bc36ef
Author: Howard Trickey
Date:   Fri Aug 28 11:43:56 2020 -0400
Branches: master
https://developer.blender.org/rB4749bd227723459097c246aa8a77c74545bc36ef

Fix to previous commit to allow building without WITH_GMP.

===================================================================

M       source/blender/blenlib/intern/math_vec.cc
M       source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
M       source/blender/blenlib/tests/BLI_mesh_intersect_test.cc

===================================================================

diff --git a/source/blender/blenlib/intern/math_vec.cc 
b/source/blender/blenlib/intern/math_vec.cc
index 865a1986214..54926f84eb9 100644
--- a/source/blender/blenlib/intern/math_vec.cc
+++ b/source/blender/blenlib/intern/math_vec.cc
@@ -146,6 +146,7 @@ double3 double3::cross_poly(Span<double3> poly)
   return n;
 }
 
+#ifdef WITH_GMP
 mpq3 mpq3::cross_poly(Span<mpq3> poly)
 {
   /* Newell's Method. */
@@ -189,5 +190,6 @@ uint64_t mpq3::hash() const
   uint64_t hashz = hash_mpq_class(this->z);
   return hashx ^ (hashy * 33) ^ (hashz * 33 * 37);
 }
+#endif
 
 }  // namespace blender
diff --git a/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc 
b/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
index af8856a2e15..b212ddb8e63 100644
--- a/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
+++ b/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
@@ -15,6 +15,7 @@
 #include "BLI_mpq3.hh"
 #include "BLI_vector.hh"
 
+#ifdef WITH_GMP
 namespace blender::meshintersect::tests {
 
 constexpr bool DO_OBJ = false;
@@ -906,3 +907,4 @@ TEST(boolean_polymesh, CubePlane)
 }
 
 }  // namespace blender::meshintersect::tests
+#endif
diff --git a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc 
b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
index 6d24c4e6c03..f3890bcebb2 100644
--- a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
+++ b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
@@ -18,6 +18,7 @@
 #define DO_REGULAR_TESTS 1
 #define DO_PERF_TESTS 0
 
+#ifdef WITH_GMP
 namespace blender::meshintersect::tests {
 
 constexpr bool DO_OBJ = false;
@@ -1070,3 +1071,4 @@ TEST(mesh_intersect_perf, SphereGrid)
 #endif
 
 }  // namespace blender::meshintersect::tests
+#endif

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to