Don't attempt download&compile of boost on WIN32
This takes forever on Windows and we want to only support docker anyways. Currently boost compilation on Windows doesn't work properly and it's probably not worth fixing this
This commit is contained in:
parent
5dea9caedb
commit
54e20873b7
|
@ -30,17 +30,8 @@ function(compile_boost)
|
|||
configure_file(${CMAKE_SOURCE_DIR}/cmake/user-config.jam.cmake ${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
|
||||
set(USER_CONFIG_FLAG --user-config=${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
if(WIN32)
|
||||
set(USER_CONFIG_FLAG "")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(BOOTSTRAP_COMMAND bootstrap)
|
||||
set(B2_COMMAND "b2")
|
||||
else()
|
||||
set(BOOTSTRAP_COMMAND ./bootstrap.sh)
|
||||
set(B2_COMMAND "./b2")
|
||||
endif()
|
||||
set(BOOTSTRAP_COMMAND bootstrap)
|
||||
set(B2_COMMAND "b2")
|
||||
|
||||
include(ExternalProject)
|
||||
set(BOOST_INSTALL_DIR "${CMAKE_BINARY_DIR}/boost_install")
|
||||
|
@ -81,12 +72,19 @@ set(BOOST_HINT_PATHS /opt/boost_1_72_0)
|
|||
if(BOOST_ROOT)
|
||||
list(APPEND BOOST_HINT_PATHS ${BOOST_ROOT})
|
||||
endif()
|
||||
find_package(Boost 1.72.0 EXACT COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
|
||||
|
||||
if(WIN32)
|
||||
set(BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Boost 1.72.0 EXACT QUIET ${BOOST_REQUIRED} COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS})
|
||||
set(FORCE_BOOST_BUILD OFF CACHE BOOL "Forces cmake to build boost and ignores any installed boost")
|
||||
|
||||
if(Boost_FOUND AND NOT FORCE_BOOST_BUILD)
|
||||
add_library(boost_target INTERFACE)
|
||||
target_link_libraries(boost_target INTERFACE Boost::boost Boost::context)
|
||||
elseif(WIN32)
|
||||
message(FATAL_ERROR "Could not find Boost")
|
||||
else()
|
||||
if(FORCE_BOOST_BUILD)
|
||||
message(STATUS "Compile boost because FORCE_BOOST_BUILD is set")
|
||||
|
|
Loading…
Reference in New Issue