Fixed unit tests on Windows after introduction of GMP to

boost::polygon Voronoi diagram generator by Vojtech.

Fixed Perl bindings on Windows after some "improvement" of the Windows 10
SDK headers, which fail if included from a C++ code using the
extern "C"
clause. Namely, the Windows 10 SDK include for sockets introduces C++ macros
if a "compiled with C++" symbol is provided even if included through
exetrn "C".
This commit is contained in:
bubnikv 2020-06-27 08:44:13 +02:00
parent 53b6c93ceb
commit c10f6a622d
5 changed files with 58 additions and 58 deletions

94
deps/CMakeLists.txt vendored
View file

@ -129,19 +129,6 @@ else()
include("deps-linux.cmake")
endif()
# Patch the boost::polygon library with a custom one.
ExternalProject_Add(dep_boost_polygon
EXCLUDE_FROM_ALL ON
GIT_REPOSITORY "https://github.com/prusa3d/polygon"
GIT_TAG prusaslicer_gmp
DEPENDS dep_boost
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/dep_boost_polygon-prefix/src/dep_boost_polygon/include/boost/polygon"
"${DESTDIR}/usr/local/include/boost/polygon"
)
set(ZLIB_PKG "")
if (NOT ZLIB_FOUND)
include(ZLIB/ZLIB.cmake)
@ -170,50 +157,49 @@ if (NOT "${ZLIB_PKG}" STREQUAL "")
add_dependencies(dep_openexr ${ZLIB_PKG})
endif ()
set(_dep_list
dep_boost
dep_tbb
dep_libcurl
dep_wxWidgets
dep_gtest
dep_cereal
dep_nlopt
dep_openvdb
dep_OpenCSG
dep_CGAL
${PNG_PKG}
${ZLIB_PKG}
${EXPAT_PKG}
)
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
# Patch the boost::polygon library with a custom one.
ExternalProject_Add(dep_boost_polygon
EXCLUDE_FROM_ALL ON
GIT_REPOSITORY "https://github.com/prusa3d/polygon"
GIT_TAG prusaslicer_gmp
DEPENDS dep_boost
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/dep_boost_polygon-prefix/src/dep_boost_polygon/include/boost/polygon"
"${DESTDIR}/usr/local/include/boost/polygon"
)
# Only override boost::Polygon Voronoi implementation with Vojtech's GMP hacks on 64bit platforms.
list(APPEND _dep_list "dep_boost_polygon")
endif ()
if (MSVC)
add_custom_target(deps ALL
DEPENDS
dep_boost
dep_boost_polygon
dep_tbb
dep_libcurl
dep_wxWidgets
dep_gtest
dep_cereal
dep_nlopt
# dep_qhull # Experimental
dep_openvdb
dep_OpenCSG
dep_CGAL
${PNG_PKG}
${ZLIB_PKG}
${EXPAT_PKG}
)
# Experimental
#list(APPEND _dep_list "dep_qhull")
else()
add_custom_target(deps ALL
DEPENDS
dep_boost
dep_boost_polygon
dep_tbb
dep_libcurl
dep_wxWidgets
dep_gtest
dep_cereal
dep_nlopt
dep_qhull
dep_openvdb
dep_OpenCSG
dep_CGAL
${PNG_PKG}
${ZLIB_PKG}
${EXPAT_PKG}
# dep_libigl # Not working, static build has different Eigen
)
list(APPEND _dep_list "dep_qhull")
# Not working, static build has different Eigen
#list(APPEND _dep_list "dep_libigl")
endif()
add_custom_target(deps ALL DEPENDS ${_dep_list})
# Note: I'm not using any of the LOG_xxx options in ExternalProject_Add() commands
# because they seem to generate bogus build files (possibly a bug in ExternalProject).