Skip to content

Commit d9ce9cf

Browse files
Get rid of unused Boost dependencies (#6960)
1 parent 3285ce3 commit d9ce9cf

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- NodeJS:
2525
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
2626
- Misc:
27+
- CHANGED: Get rid of unused Boost dependencies. [#6960](https://github.com/Project-OSRM/osrm-backend/pull/6960)
2728
- CHANGED: Apply micro-optimisation for Table & Trip APIs. [#6949](https://github.com/Project-OSRM/osrm-backend/pull/6949)
2829
- CHANGED: Apply micro-optimisation for Route API. [#6948](https://github.com/Project-OSRM/osrm-backend/pull/6948)
2930
- CHANGED: Apply micro-optimisation for Match API. [#6945](https://github.com/Project-OSRM/osrm-backend/pull/6945)

CMakeLists.txt

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
122122
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include/)
123123
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/sol2/include)
124124

125-
set(BOOST_COMPONENTS date_time chrono filesystem iostreams program_options regex system thread unit_test_framework)
125+
set(BOOST_COMPONENTS date_time iostreams program_options thread unit_test_framework)
126126

127127
configure_file(
128128
${CMAKE_CURRENT_SOURCE_DIR}/include/util/version.hpp.in
@@ -348,8 +348,7 @@ if(ENABLE_CONAN)
348348
GENERATORS cmake_find_package json # json generator generates a conanbuildinfo.json in the build folder so (non-CMake) projects can easily parse OSRM's dependencies
349349
KEEP_RPATHS
350350
NO_OUTPUT_DIRS
351-
OPTIONS boost:filesystem_version=3 # https://stackoverflow.com/questions/73392648/error-with-boost-filesystem-version-in-cmake
352-
boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
351+
OPTIONS boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
353352
BUILD missing
354353
)
355354

@@ -378,14 +377,10 @@ if(ENABLE_CONAN)
378377
set(Boost_USE_STATIC_LIBS ON)
379378
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
380379
set(Boost_DATE_TIME_LIBRARY "${Boost_date_time_LIB_TARGETS}")
381-
set(Boost_CHRONO_LIBRARY "${Boost_chrono_LIB_TARGETS}")
382380
set(Boost_PROGRAM_OPTIONS_LIBRARY "${Boost_program_options_LIB_TARGETS}")
383-
set(Boost_FILESYSTEM_LIBRARY "${Boost_filesystem_LIB_TARGETS}")
384381
set(Boost_IOSTREAMS_LIBRARY "${Boost_iostreams_LIB_TARGETS}")
385382
set(Boost_THREAD_LIBRARY "${Boost_thread_LIB_TARGETS}")
386-
set(Boost_SYSTEM_LIBRARY "${Boost_system_LIB_TARGETS}")
387383
set(Boost_ZLIB_LIBRARY "${Boost_zlib_LIB_TARGETS}")
388-
set(Boost_REGEX_LIBRARY "${Boost_regex_LIB_TARGETS}")
389384
set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "${Boost_unit_test_framework_LIB_TARGETS}")
390385

391386

@@ -458,7 +453,6 @@ add_dependency_includes(${ZLIB_INCLUDE_DIRS})
458453

459454
add_dependency_defines(-DBOOST_SPIRIT_USE_PHOENIX_V3)
460455
add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE)
461-
add_dependency_defines(-DBOOST_FILESYSTEM_NO_DEPRECATED)
462456

463457
# Workaround for https://github.com/boostorg/phoenix/issues/111
464458
add_dependency_defines(-DBOOST_PHOENIX_STL_TUPLE_H_)
@@ -468,11 +462,8 @@ include_directories(SYSTEM ${DEPENDENCIES_INCLUDE_DIRS})
468462

469463
set(BOOST_BASE_LIBRARIES
470464
${Boost_DATE_TIME_LIBRARY}
471-
${Boost_CHRONO_LIBRARY}
472-
${Boost_FILESYSTEM_LIBRARY}
473465
${Boost_IOSTREAMS_LIBRARY}
474-
${Boost_THREAD_LIBRARY}
475-
${Boost_SYSTEM_LIBRARY})
466+
${Boost_THREAD_LIBRARY})
476467

477468
set(BOOST_ENGINE_LIBRARIES
478469
${Boost_ZLIB_LIBRARY}
@@ -491,7 +482,6 @@ endif()
491482

492483
set(EXTRACTOR_LIBRARIES
493484
${BZIP2_LIBRARIES}
494-
${Boost_REGEX_LIBRARY}
495485
${BOOST_BASE_LIBRARIES}
496486
${CMAKE_THREAD_LIBS_INIT}
497487
${EXPAT_LIBRARIES}

docker/Dockerfile-alpine

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ COPY --from=builder /usr/local /usr/local
4747
COPY --from=builder /opt /opt
4848

4949
RUN apk add --no-cache \
50-
boost-program_options boost-regex \
51-
boost-date_time boost-chrono boost-filesystem \
52-
boost-iostreams boost-system boost-thread \
50+
boost-program_options boost-date_time boost-iostreams boost-thread \
5351
expat lua5.4 onetbb && \
5452
ldconfig /usr/local/lib
5553

docker/Dockerfile-debian

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ COPY --from=builder /usr/local /usr/local
4949
COPY --from=builder /opt /opt
5050

5151
RUN apt-get update && \
52-
apt-get install -y --no-install-recommends libboost-program-options1.81.0 libboost-regex1.81.0 \
53-
libboost-date-time1.81.0 libboost-chrono1.81.0 libboost-filesystem1.81.0 \
54-
libboost-iostreams1.81.0 libboost-system1.81.0 libboost-thread1.81.0 \
52+
apt-get install -y --no-install-recommends \
53+
libboost-program-options1.81.0 libboost-date-time1.81.0 libboost-iostreams1.81.0 libboost-thread1.81.0 \
5554
expat liblua5.4-0 && \
5655
rm -rf /var/lib/apt/lists/* && \
5756
# add /usr/local/lib to ldconfig to allow loading libraries from there

0 commit comments

Comments
 (0)