Skip to content

Commit a7e1bac

Browse files
authored
Merge pull request #16163 from cho-m/boost-1.89.0
Remove the hard dependency on `boost::system` compatibility library to fix builds with Boost 1.89.0
2 parents 6dfcf35 + db18d42 commit a7e1bac

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cmake/EthDependencies.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if (WIN32)
2929
option(Boost_USE_STATIC_RUNTIME "Link Boost against static C++ runtime libraries" ON)
3030
endif()
3131

32-
set(BOOST_COMPONENTS "filesystem;unit_test_framework;program_options;system")
32+
set(BOOST_COMPONENTS "filesystem;unit_test_framework;program_options")
3333

3434
# CMake >= 3.30 should not use the vendored boost
3535
if(POLICY CMP0167)
@@ -50,6 +50,7 @@ else()
5050
if(POLICY CMP0167)
5151
cmake_policy(SET CMP0167 OLD)
5252
endif()
53+
list(APPEND BOOST_COMPONENTS system)
5354
find_package(Boost 1.67.0 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
5455
endif()
5556
endif()

libsolutil/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set(sources
4747
)
4848

4949
add_library(solutil ${sources})
50-
target_link_libraries(solutil PUBLIC Boost::boost Boost::filesystem Boost::system range-v3 fmt::fmt-header-only nlohmann_json::nlohmann_json)
50+
target_link_libraries(solutil PUBLIC Boost::boost Boost::filesystem ${Boost_SYSTEM_LIBRARY} range-v3 fmt::fmt-header-only nlohmann_json::nlohmann_json)
5151
target_include_directories(solutil PUBLIC "${PROJECT_SOURCE_DIR}")
5252
add_dependencies(solutil solidity_BuildInfo.h)
5353

test/tools/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ add_executable(yulrun yulrun.cpp)
55
target_link_libraries(yulrun PRIVATE yulInterpreter libsolc evmasm Boost::boost Boost::program_options)
66

77
add_executable(solfuzzer afl_fuzzer.cpp fuzzer_common.cpp)
8-
target_link_libraries(solfuzzer PRIVATE libsolc evmasm Boost::boost Boost::program_options Boost::system)
8+
target_link_libraries(solfuzzer PRIVATE libsolc evmasm Boost::boost Boost::program_options ${Boost_SYSTEM_LIBRARY})
99

1010
add_executable(yulopti yulopti.cpp)
11-
target_link_libraries(yulopti PRIVATE solidity Boost::boost Boost::program_options Boost::system)
11+
target_link_libraries(yulopti PRIVATE solidity Boost::boost Boost::program_options ${Boost_SYSTEM_LIBRARY})
1212

1313
add_executable(isoltest
1414
isoltest.cpp

0 commit comments

Comments
 (0)