mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Increase minimum Boost version to 1.77 on Windows
This commit is contained in:
parent
d4d778de77
commit
e3a3829f97
@ -25,13 +25,20 @@ set(ETH_SCRIPTS_DIR ${ETH_CMAKE_DIR}/scripts)
|
|||||||
## use multithreaded boost libraries, with -mt suffix
|
## use multithreaded boost libraries, with -mt suffix
|
||||||
set(Boost_USE_MULTITHREADED ON)
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
option(Boost_USE_STATIC_LIBS "Link Boost statically" ON)
|
option(Boost_USE_STATIC_LIBS "Link Boost statically" ON)
|
||||||
if(WIN32)
|
if (WIN32)
|
||||||
option(Boost_USE_STATIC_RUNTIME "Link Boost against static C++ runtime libraries" ON)
|
option(Boost_USE_STATIC_RUNTIME "Link Boost against static C++ runtime libraries" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BOOST_COMPONENTS "filesystem;unit_test_framework;program_options;system")
|
set(BOOST_COMPONENTS "filesystem;unit_test_framework;program_options;system")
|
||||||
|
|
||||||
find_package(Boost 1.65.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
if (WIN32)
|
||||||
|
# Boost 1.77 fixes a bug that causes crashes on Windows for some relative paths in --allow-paths.
|
||||||
|
# See https://github.com/boostorg/filesystem/issues/201
|
||||||
|
find_package(Boost 1.77.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
else()
|
||||||
|
# Boost 1.65 is the first to also provide boost::get for rvalue-references (#5787).
|
||||||
|
find_package(Boost 1.65.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
endif()
|
||||||
|
|
||||||
# If cmake is older than boost and boost is older than 1.70,
|
# If cmake is older than boost and boost is older than 1.70,
|
||||||
# find_package does not define imported targets, so we have to
|
# find_package does not define imported targets, so we have to
|
||||||
@ -51,7 +58,7 @@ foreach (BOOST_COMPONENT IN LISTS BOOST_COMPONENTS)
|
|||||||
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY IMPORTED_LOCATION ${Boost_${BOOST_COMPONENT_UPPER}_LIBRARY})
|
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_LINK_LIBRARIES ${Boost_${BOOST_COMPONENT_UPPER}_LIBRARIES})
|
||||||
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
set_property(TARGET Boost::${BOOST_COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
get_property(LOCATION TARGET Boost::${BOOST_COMPONENT} PROPERTY IMPORTED_LOCATION)
|
get_property(LOCATION TARGET Boost::${BOOST_COMPONENT} PROPERTY IMPORTED_LOCATION)
|
||||||
message(STATUS "Found Boost::${BOOST_COMPONENT} at ${LOCATION}")
|
message(STATUS "Found Boost::${BOOST_COMPONENT} at ${LOCATION}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -313,7 +313,8 @@ The following are dependencies for all builds of Solidity:
|
|||||||
+===================================+=======================================================+
|
+===================================+=======================================================+
|
||||||
| `CMake`_ (version 3.13+) | Cross-platform build file generator. |
|
| `CMake`_ (version 3.13+) | Cross-platform build file generator. |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
| `Boost`_ (version 1.65+) | C++ libraries. |
|
| `Boost`_ (version 1.77+ on | C++ libraries. |
|
||||||
|
| Windows, 1.65+ otherwise) | |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
| `Git`_ | Command-line tool for retrieving source code. |
|
| `Git`_ | Command-line tool for retrieving source code. |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
@ -378,6 +379,8 @@ You need to install the following dependencies for Windows builds of Solidity:
|
|||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
| `Visual Studio 2019`_ (Optional) | C++ compiler and dev environment. |
|
| `Visual Studio 2019`_ (Optional) | C++ compiler and dev environment. |
|
||||||
+-----------------------------------+-------------------------------------------------------+
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
|
| `Boost`_ (version 1.77+) | C++ libraries. |
|
||||||
|
+-----------------------------------+-------------------------------------------------------+
|
||||||
|
|
||||||
If you already have one IDE and only need the compiler and libraries,
|
If you already have one IDE and only need the compiler and libraries,
|
||||||
you could install Visual Studio 2019 Build Tools.
|
you could install Visual Studio 2019 Build Tools.
|
||||||
|
@ -15,12 +15,12 @@ if ( -not (Test-Path "$PSScriptRoot\..\deps\boost") ) {
|
|||||||
|
|
||||||
# FIXME: The default user agent results in Artifactory treating Invoke-WebRequest as a browser
|
# FIXME: The default user agent results in Artifactory treating Invoke-WebRequest as a browser
|
||||||
# and serving it a page that requires JavaScript.
|
# and serving it a page that requires JavaScript.
|
||||||
Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.zip" -OutFile boost.zip -UserAgent ""
|
Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.zip" -OutFile boost.zip -UserAgent ""
|
||||||
if ((Get-FileHash boost.zip).Hash -ne "a0e7ce67c52d816708fdeccdd8c9725626ba61254c13c18770498cacd514710a") {
|
if ((Get-FileHash boost.zip).Hash -ne "d2886ceff60c35fc6dc9120e8faa960c1e9535f2d7ce447469eae9836110ea77") {
|
||||||
throw 'Downloaded Boost source package has wrong checksum.'
|
throw 'Downloaded Boost source package has wrong checksum.'
|
||||||
}
|
}
|
||||||
tar -xf boost.zip
|
tar -xf boost.zip
|
||||||
cd boost_1_74_0
|
cd boost_1_77_0
|
||||||
.\bootstrap.bat
|
.\bootstrap.bat
|
||||||
.\b2 -j4 -d0 link=static runtime-link=static variant=release threading=multi address-model=64 --with-filesystem --with-system --with-program_options --with-test --prefix="$PSScriptRoot\..\deps\boost" install
|
.\b2 -j4 -d0 link=static runtime-link=static variant=release threading=multi address-model=64 --with-filesystem --with-system --with-program_options --with-test --prefix="$PSScriptRoot\..\deps\boost" install
|
||||||
if ( -not $? ) { throw "Error building boost." }
|
if ( -not $? ) { throw "Error building boost." }
|
||||||
|
Loading…
Reference in New Issue
Block a user