diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d3dcc44..4bc6ed1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,7 +198,7 @@ build_mac: -DUSE_NATIVE_ARCH=OFF -DUSE_CCACHE=ON -DENABLE_UNIT_TESTS=ON - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk - make -j5 install diff --git a/external_dependencies/pybind11 b/external_dependencies/pybind11 index 2a150736..b9387195 160000 --- a/external_dependencies/pybind11 +++ b/external_dependencies/pybind11 @@ -1 +1 @@ -Subproject commit 2a150736601bb3113877bb673fb934bb60d46ec5 +Subproject commit b9387195ef024f4b96f1cba68d30b0d5539e6bf9 diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt index 368247ed..15198d50 100644 --- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt @@ -10,6 +10,11 @@ add_library(ngcore SHARED utils.cpp ) +# Pybind11 2.3 Issue https://github.com/pybind/pybind11/issues/1604 +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + target_compile_options(ngcore PUBLIC -fsized-deallocation -faligned-allocation) +endif() + if(USE_PYTHON) target_sources(ngcore PRIVATE python_ngcore.cpp) endif(USE_PYTHON) diff --git a/libsrc/core/ngcore_api.hpp b/libsrc/core/ngcore_api.hpp index dfdee659..4841eb07 100644 --- a/libsrc/core/ngcore_api.hpp +++ b/libsrc/core/ngcore_api.hpp @@ -73,6 +73,7 @@ inline void operator delete[]( void* ptr, std::align_val_t al ) noexcept else delete[] (char*)ptr; } + #endif // __MAC_OS_X_VERSION_MIN_REQUIRED #endif // __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 diff --git a/libsrc/core/python_ngcore.cpp b/libsrc/core/python_ngcore.cpp index f60e40d3..5e64d1b2 100644 --- a/libsrc/core/python_ngcore.cpp +++ b/libsrc/core/python_ngcore.cpp @@ -1,10 +1,6 @@ -#include -#include "python_ngcore.hpp" - -#include "array.hpp" -#include "flags.hpp" #include "logging.hpp" +#include "python_ngcore.hpp" namespace py = pybind11; using std::string; diff --git a/libsrc/core/python_ngcore.hpp b/libsrc/core/python_ngcore.hpp index 7b22ee79..1a071dc2 100644 --- a/libsrc/core/python_ngcore.hpp +++ b/libsrc/core/python_ngcore.hpp @@ -1,6 +1,7 @@ #ifndef NETGEN_CORE_PYTHON_NGCORE_HPP #define NETGEN_CORE_PYTHON_NGCORE_HPP +#include "ngcore_api.hpp" // for operator new #include #include "array.hpp" diff --git a/libsrc/general/ngpython.hpp b/libsrc/general/ngpython.hpp index e13533c1..ef02d19f 100644 --- a/libsrc/general/ngpython.hpp +++ b/libsrc/general/ngpython.hpp @@ -1,13 +1,13 @@ #ifdef NG_PYTHON -#include +#include + #include #include #include #include #include -#include using namespace ngcore; template diff --git a/libsrc/meshing/python_mesh.hpp b/libsrc/meshing/python_mesh.hpp index 62a85778..cc554fc6 100644 --- a/libsrc/meshing/python_mesh.hpp +++ b/libsrc/meshing/python_mesh.hpp @@ -1,9 +1,8 @@ #ifndef NETGEN_MESHING_PYTHON_MESH_HPP #define NETGEN_MESHING_PYTHON_MESH_HPP -#include - #include + #include "meshing.hpp" namespace netgen