mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Define imported targets manually, if not provided by find_package(Boost).
This commit is contained in:
parent
2ec45797b2
commit
cb9c35f883
@ -28,9 +28,16 @@ set(BOOST_COMPONENTS "regex;filesystem;unit_test_framework;program_options;syste
|
||||
find_package(Boost 1.65.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
|
||||
# make sure we actually get all required imported targets for boost
|
||||
list(APPEND BOOST_COMPONENTS "boost") # header only target
|
||||
if (NOT TARGET Boost::boost) # header only target
|
||||
add_library(Boost::boost INTERFACE IMPORTED)
|
||||
target_include_directories(Boost::boost INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
foreach (BOOST_COMPONENT IN LISTS BOOST_COMPONENTS)
|
||||
if (NOT TARGET Boost::${BOOST_COMPONENT})
|
||||
message(FATAL_ERROR "Boost target Boost::${BOOST_COMPONENT} was not defined by cmake.")
|
||||
add_library(Boost::${BOOST_COMPONENT} UNKNOWN IMPORTED)
|
||||
string(TOUPPER ${BOOST_COMPONENT} BOOST_COMPONENT_UPPER)
|
||||
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY IMPORTED_LOCATION ${Boost_${BOOST_COMPONENT_UPPER}_LIBRARY})
|
||||
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_LINK_LIBRARIES ${Boost_${BOOST_COMPONENT_UPPER}_LIBRARIES})
|
||||
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -64,7 +64,7 @@ fi
|
||||
|
||||
# Boost
|
||||
echo -en 'travis_fold:start:compiling_boost\\r'
|
||||
test -e "$WORKSPACE"/boost_1_70_0_install || (
|
||||
test -e "$WORKSPACE"/boost_1_70_0_install/include/boost/version.hpp || (
|
||||
cd "$WORKSPACE"/boost_1_70_0
|
||||
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
|
||||
--with-system --with-regex --with-filesystem --with-test --with-program_options cxxflags="-Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
|
||||
|
@ -30,7 +30,7 @@
|
||||
set -ev
|
||||
|
||||
echo -en 'travis_fold:start:installing_dependencies\\r'
|
||||
test -e boost_1_70_0_install || (
|
||||
test -e boost_1_70_0_install/include/boost/version.hpp || (
|
||||
rm -rf boost_1_70_0
|
||||
rm -f boost.tar.gz
|
||||
wget -q 'https://sourceforge.net/projects/boost/files/boost/1.70.0/boost_1_70_0.tar.gz/download'\
|
||||
|
Loading…
Reference in New Issue
Block a user