port to MSYS2/clang

This commit is contained in:
wmayer
2021-09-19 19:49:44 +02:00
parent ef0e303235
commit e211b89cf8
29 changed files with 82 additions and 49 deletions

View File

@@ -145,6 +145,15 @@ target_link_libraries(Path ${Path_LIBS})
if(NOT ${Boost_VERSION} LESS 107500)
set_target_properties(Path PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(Path PROPERTIES CXX_STANDARD 14)
# Suppress -Wc++17-extensions when using OCCT 7.5 or newer
if (MINGW AND CMAKE_COMPILER_IS_CLANGXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-c++17-extensions" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++17-extensions")
endif()
endif()
endif()
if(FREECAD_USE_PCH)

View File

@@ -10,7 +10,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#ifdef WIN32
#ifdef _MSC_VER
#pragma warning( disable : 4996 )
#ifndef WINVER
#define WINVER 0x501
@@ -772,7 +772,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
#ifdef WIN32
#ifdef _MSC_VER
#pragma warning(disable:4522)
#endif
@@ -902,7 +902,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
PK_BODY_t ToPKlofted_thickened_body(Kurve &sec, double thickness);
#endif
};
#ifdef WIN32
#ifdef _MSC_VER
#pragma warning(default:4522)
#endif