diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7be853b599..c1e8dbf53c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -946,12 +946,6 @@ TARGET_LINK_LIBRARIES(Serializers ${SERIALIZER_SCHEMA_LIBRARIES} ${OPENCOLLADA_L endif() -if (MSVC) -# @todo still needs to be understood better, but the cgal and cgal-simple kernel cause multiply defined boost lambda placeholders _1 ... _3 -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /FORCE:MULTIPLE") -endif() - if (BUILD_CONVERT) if (WITH_CGAL AND CITYJSON_SUPPORT) @@ -1046,6 +1040,13 @@ if (GIT_FOUND) endif() endif() +if (MSVC) +# @todo still needs to be understood better, but the cgal and cgal-simple kernel cause multiply defined boost lambda placeholders _1 ... _3 +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /FORCE:MULTIPLE") +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /FORCE:MULTIPLE") +endif() + # Documentation IF(BUILD_DOCUMENTATION) set(CMAKE_MODULE_PATH "../docs/cmake") diff --git a/src/ifcgeom/AbstractKernel.cpp b/src/ifcgeom/AbstractKernel.cpp index 3286624949..1c7cf4075b 100644 --- a/src/ifcgeom/AbstractKernel.cpp +++ b/src/ifcgeom/AbstractKernel.cpp @@ -14,6 +14,7 @@ #undef CGALCONVERSIONRESULT_H #define IFOPSH_SIMPLE_KERNEL #include "../ifcgeom/kernels/cgal/CgalKernel.h" +#undef CgalKernel #endif using namespace ifcopenshell::geometry;