[Bf-blender-cvs] [a434b30667c] master: Fix building QuadriFlow with Clang on Windows

Ray Molenkamp noreply at git.blender.org
Wed Oct 2 12:43:03 CEST 2019


Commit: a434b30667c02609c307d2871b27f24a64ff3f44
Author: Ray Molenkamp
Date:   Wed Oct 2 12:36:07 2019 +0200
Branches: master
https://developer.blender.org/rBa434b30667c02609c307d2871b27f24a64ff3f44

Fix building QuadriFlow with Clang on Windows

Boost 1.68 has a bug in its type_traits where it does not include the right
header for the is_assignable macro when building with Clang. Temporarily work
around it until we upgrade to a newer Boost version that fixes it.

Differential Revision: https://developer.blender.org/D5962

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

M	extern/quadriflow/patches/blender.patch
M	extern/quadriflow/src/config.hpp

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

diff --git a/extern/quadriflow/patches/blender.patch b/extern/quadriflow/patches/blender.patch
index d131abc52e2..55fdd123e3b 100644
--- a/extern/quadriflow/patches/blender.patch
+++ b/extern/quadriflow/patches/blender.patch
@@ -1,3 +1,19 @@
+diff --git a/extern/quadriflow/src/config.hpp b/extern/quadriflow/src/config.hpp
+index 842b885..bf597ad 100644
+--- a/extern/quadriflow/src/config.hpp
++++ b/extern/quadriflow/src/config.hpp
+@@ -1,6 +1,11 @@
+ #ifndef CONFIG_H_
+ #define CONFIG_H_
+ 
++/* Workaround a bug in boost 1.68, until we upgrade to a newer version. */
++#if defined(__clang__) && defined(WIN32)
++  #include <boost/type_traits/is_assignable.hpp>
++  using namespace boost;
++#endif
+ // Move settings to cmake to make CMake happy :)
+ 
+ // #define WITH_SCALE
 diff --git a/extern/quadriflow/3rd/lemon-1.3.1/lemon/arg_parser.cc b/extern/quadriflow/3rd/lemon-1.3.1/lemon/arg_parser.cc
 index 35a73d9..0eeba8a 100644
 --- a/extern/quadriflow/3rd/lemon-1.3.1/lemon/arg_parser.cc
diff --git a/extern/quadriflow/src/config.hpp b/extern/quadriflow/src/config.hpp
index 842b885a209..bf597ad0f39 100644
--- a/extern/quadriflow/src/config.hpp
+++ b/extern/quadriflow/src/config.hpp
@@ -1,6 +1,11 @@
 #ifndef CONFIG_H_
 #define CONFIG_H_
 
+/* Workaround a bug in boost 1.68, until we upgrade to a newer version. */
+#if defined(__clang__) && defined(WIN32)
+  #include <boost/type_traits/is_assignable.hpp>
+  using namespace boost;
+#endif
 // Move settings to cmake to make CMake happy :)
 
 // #define WITH_SCALE



More information about the Bf-blender-cvs mailing list