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:
Ray molenkamp 2020-08-26 10:04:24 -06:00
parent 3185e17844
commit b028a43245
3 changed files with 13 additions and 4 deletions

View File

@ -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()

View File

@ -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

View File

@ -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);