diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-08-26 19:04:24 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-08-26 19:04:24 +0300 |
commit | b028a43245afeb73ca1b35a3698fbbd329d1f100 (patch) | |
tree | 291561de9c88c1c183d23aa83292e846e11f5117 | |
parent | 3185e17844caa72d2922994a16f0f50333adbbc8 (diff) |
Cleanup:Remove C++14 flags from extern/quadriflow
The main CMakeLists.txt specifies C++17, quadriflow tries to add C++14
flags leading to the following warnings when building with MSVC
Command line warning D9025 : overriding '/std:c++17' with '/std:c++14`
This change removes the C++14 flags, and fixes a build error caused
by the removal of `std::unary_function` in C++17 in the .obj loader
(which isn't used by blender)
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D8720
-rw-r--r-- | extern/quadriflow/CMakeLists.txt | 3 | ||||
-rw-r--r-- | extern/quadriflow/patches/blender.patch | 12 | ||||
-rw-r--r-- | extern/quadriflow/src/loader.cpp | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/extern/quadriflow/CMakeLists.txt b/extern/quadriflow/CMakeLists.txt index bf64e5edb67..e24151d8bf6 100644 --- a/extern/quadriflow/CMakeLists.txt +++ b/extern/quadriflow/CMakeLists.txt @@ -28,9 +28,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") ) endif() -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - if(WIN32) add_definitions(-D_USE_MATH_DEFINES) endif() diff --git a/extern/quadriflow/patches/blender.patch b/extern/quadriflow/patches/blender.patch index eceda489393..6405a47e262 100644 --- a/extern/quadriflow/patches/blender.patch +++ b/extern/quadriflow/patches/blender.patch @@ -1,3 +1,15 @@ +diff --git a/extern/quadriflow/src/loader.cpp b/extern/quadriflow/src/loader.cpp +--- a/extern/quadriflow/src/loader.cpp ++++ b/extern/quadriflow/src/loader.cpp +@@ -69,7 +69,7 @@ + }; + + /// Hash function for obj_vertex +- struct obj_vertexHash : std::unary_function<obj_vertex, size_t> { ++ struct obj_vertexHash { + std::size_t operator()(const obj_vertex &v) const { + size_t hash = std::hash<uint32_t>()(v.p); + hash = hash * 37 + std::hash<uint32_t>()(v.uv); diff --git a/extern/quadriflow/src/config.hpp b/extern/quadriflow/src/config.hpp index 842b885..bf597ad 100644 --- a/extern/quadriflow/src/config.hpp diff --git a/extern/quadriflow/src/loader.cpp b/extern/quadriflow/src/loader.cpp index aa27066e6e4..a1596eeff9a 100644 --- a/extern/quadriflow/src/loader.cpp +++ b/extern/quadriflow/src/loader.cpp @@ -69,7 +69,7 @@ void load(const char* filename, MatrixXd& V, MatrixXi& F) }; /// Hash function for obj_vertex - struct obj_vertexHash : std::unary_function<obj_vertex, size_t> { + struct obj_vertexHash { std::size_t operator()(const obj_vertex &v) const { size_t hash = std::hash<uint32_t>()(v.p); hash = hash * 37 + std::hash<uint32_t>()(v.uv); |