port to MSYS2/clang
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#elif defined (FC_OS_MACOSX)
|
||||
# include <OpenGL/gl.h>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
namespace MeshCore {
|
||||
|
||||
template<> const float Math<float> ::PI = (float)(4.0*atan(1.0));
|
||||
template<> const double Math<double>::PI = 4.0*atan(1.0);
|
||||
template<> MeshExport const float Math<float> ::PI = (float)(4.0*atan(1.0));
|
||||
template<> MeshExport const double Math<double>::PI = 4.0*atan(1.0);
|
||||
|
||||
float MeshDefinitions::_fMinPointDistance = float(MESH_MIN_PT_DIST);
|
||||
float MeshDefinitions::_fMinPointDistanceP2 = _fMinPointDistance * _fMinPointDistance;
|
||||
|
||||
@@ -1471,7 +1471,7 @@ void SoBrepFaceSet::VBO::render(SoGLRenderAction * action,
|
||||
const cc_glglue * glue = cc_glglue_instance(action->getCacheContext());
|
||||
|
||||
PFNGLBINDBUFFERARBPROC glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cc_glglue_getprocaddress(glue, "glBindBufferARB");
|
||||
PFNGLMAPBUFFERARBPROC glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cc_glglue_getprocaddress(glue, "glMapBufferARB");
|
||||
//PFNGLMAPBUFFERARBPROC glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cc_glglue_getprocaddress(glue, "glMapBufferARB");
|
||||
PFNGLGENBUFFERSPROC glGenBuffersARB = (PFNGLGENBUFFERSPROC)cc_glglue_getprocaddress(glue, "glGenBuffersARB");
|
||||
PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)cc_glglue_getprocaddress(glue, "glDeleteBuffersARB");
|
||||
PFNGLBUFFERDATAARBPROC glBufferDataARB = (PFNGLBUFFERDATAARBPROC)cc_glglue_getprocaddress(glue, "glBufferDataARB");
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "PointsAlgos.h"
|
||||
#include "PointsPy.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
# include <ppl.h>
|
||||
#endif
|
||||
|
||||
@@ -85,7 +85,7 @@ Data::Segment* PointKernel::getSubElement(const char* /*Type*/, unsigned long /*
|
||||
void PointKernel::transformGeometry(const Base::Matrix4D &rclMat)
|
||||
{
|
||||
std::vector<value_type>& kernel = getBasicPoints();
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
// Win32-only at the moment since ppl.h is a Microsoft library. Points is not using Qt so we cannot use QtConcurrent
|
||||
// We could also rewrite Points to leverage SIMD instructions
|
||||
// Other option: openMP. But with VC2013 results in high CPU usage even after computation (busy-waits for >100ms)
|
||||
@@ -103,7 +103,7 @@ Base::BoundBox3d PointKernel::getBoundBox(void)const
|
||||
{
|
||||
Base::BoundBox3d bnd;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
// Thread-local bounding boxes
|
||||
Concurrency::combinable<Base::BoundBox3d> bbs;
|
||||
// Cannot use a const_point_iterator here as it is *not* a proper iterator (fails the for_each template)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "PointsPy.h"
|
||||
|
||||
#include <QtConcurrentMap>
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
# include <ppl.h>
|
||||
#endif
|
||||
|
||||
@@ -393,7 +393,7 @@ void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat)
|
||||
aboutToSetValue();
|
||||
|
||||
// Rotate the normal vectors
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
Concurrency::parallel_for_each(_lValueList.begin(), _lValueList.end(), [rot](Base::Vector3f& value) {
|
||||
value = rot * value;
|
||||
});
|
||||
|
||||
@@ -131,6 +131,10 @@ if (_flag_found)
|
||||
target_compile_options(Robot PRIVATE -Wno-deprecated-copy)
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Robot Robot /Mod/Robot)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Robot)
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ bool PATLineSpec::findPatternStart(std::ifstream& inFile, std::string& parmName
|
||||
std::getline(inFile,line);
|
||||
std::string nameTag = line.substr(0,1);
|
||||
std::string patternName;
|
||||
unsigned long int commaPos;
|
||||
std::size_t commaPos;
|
||||
if ((nameTag == ";") ||
|
||||
(nameTag == " ") ||
|
||||
(line.empty()) ) { //is cr/lf empty?
|
||||
@@ -394,7 +394,7 @@ std::vector<std::string> PATLineSpec::getPatternList(std::string& parmFile)
|
||||
std::string line;
|
||||
std::getline(inFile,line);
|
||||
std::string nameTag = line.substr(0,1); //dupl code here
|
||||
unsigned long int commaPos;
|
||||
std::size_t commaPos;
|
||||
if (nameTag == "*") { //found a pattern
|
||||
commaPos = line.find(',',1);
|
||||
std::string patternName;
|
||||
|
||||
@@ -208,7 +208,7 @@ std::string LineGroup::getGroupNamesFromFile(std::string FileName)
|
||||
std::getline(inFile, line);
|
||||
std::string nameTag = line.substr(0, 1);
|
||||
std::string found;
|
||||
unsigned long int commaPos;
|
||||
std::size_t commaPos;
|
||||
if (nameTag == "*") {
|
||||
commaPos = line.find(',', 1);
|
||||
if (commaPos != std::string::npos) {
|
||||
|
||||
Reference in New Issue
Block a user