Skip to content

Commit

Permalink
FIX: boost build on macos
Browse files Browse the repository at this point in the history
Change-Id: I9ac1f05b93581f5c88cec12291049e77f441cb8b
(cherry picked from commit ebe0a67ffc578035510c3f231a085bd8ebe5b787)
  • Loading branch information
bambu123 authored and lanewei120 committed Jul 13, 2023
1 parent 9bc72ce commit ef111ab
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions deps/Boost/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (WIN32)
set(_boost_toolset "clang-win")
elseif (APPLE)
set(_boost_toolset "clang")
else()
set(_boost_toolset clang)
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
Expand Down Expand Up @@ -122,33 +124,19 @@ set(_build_cmd ${_build_cmd}

set(_install_cmd ${_build_cmd} --prefix=${_prefix} install)

list(APPEND _patch_command COMMAND git init && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-Boost-fix.patch)

if (MSVC)
ExternalProject_Add(
dep_Boost
URL "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
URL_HASH SHA256=f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
CONFIGURE_COMMAND "${_bootstrap_cmd}"
PATCH_COMMAND ${_patch_command}
PATCH_COMMAND git init && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-Boost-fix.patch
BUILD_COMMAND "${_build_cmd}"
BUILD_IN_SOURCE ON
INSTALL_COMMAND "${_install_cmd}"
)
else ()
ExternalProject_Add(
dep_Boost
URL "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
URL_HASH SHA256=f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
CONFIGURE_COMMAND "${_bootstrap_cmd}"
PATCH_COMMAND ${_patch_command} && git init && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-Boost-fix.patch
BUILD_COMMAND "${_build_cmd}"
BUILD_IN_SOURCE ON
INSTALL_COMMAND "${_install_cmd}"
)
endif ()

if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
# Patch the boost::polygon library with a custom one.
Expand Down

0 comments on commit ef111ab

Please sign in to comment.