Commit 0d447e1d authored by Martin Heistermann's avatar Martin Heistermann

Create c++ version detection macros OVM_CXX_{14,17}.

parent aef0ecb4
......@@ -134,6 +134,7 @@ target_compile_definitions(OpenVolumeMesh
target_compile_options(OpenVolumeMesh PRIVATE
"$<$<CXX_COMPILER_ID:MSVC>:/W1>"
"$<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>" # Enable updated __cplusplus macro
"$<$<CXX_COMPILER_ID:GNU>:-Wall>"
"$<$<CXX_COMPILER_ID:Clang>:-Wall;-Wno-c++98-compat;-Wno-c++98-compat-pedantic;-Wno-weak-vtables;-Wno-padded;-Wno-sign-conversion;-Wno-missing-prototypes>"
)
......
#if __cplusplus >= 201402L
#define OVM_CXX_14 1
#else
#define OVM_CXX_14 0
#endif
#if __cplusplus >= 201703L
#define OVM_CXX_17 1
#else
#define OVM_CXX_17 0
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment