forked from bartvdbraak/blender
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
This commit is contained in:
parent
3185e17844
commit
b028a43245
3
extern/quadriflow/CMakeLists.txt
vendored
3
extern/quadriflow/CMakeLists.txt
vendored
@ -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()
|
||||
|
12
extern/quadriflow/patches/blender.patch
vendored
12
extern/quadriflow/patches/blender.patch
vendored
@ -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
|
||||
|
2
extern/quadriflow/src/loader.cpp
vendored
2
extern/quadriflow/src/loader.cpp
vendored
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user