Skip to content

Commit 1825e27

Browse files
committed
Revert "feat cmake: add CPM to Boost"
This reverts commit 4880cdf67f132813d979f0a22fedc9d837ba51cb, reversing changes made to 44cf72ab1aa4eef6e652cc09f834deb41ea812d0. Tests: протестировано CI commit_hash:d8cd4d0ed35411a15c82d3d747da386ef7d8e7b1
1 parent f4c21b7 commit 1825e27

File tree

7 files changed

+11
-82
lines changed

7 files changed

+11
-82
lines changed

.mapping.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@
497497
"cmake/Sanitizers.cmake":"taxi/uservices/userver/cmake/Sanitizers.cmake",
498498
"cmake/SetupAbseil.cmake":"taxi/uservices/userver/cmake/SetupAbseil.cmake",
499499
"cmake/SetupAmqpCPP.cmake":"taxi/uservices/userver/cmake/SetupAmqpCPP.cmake",
500-
"cmake/SetupBoost.cmake":"taxi/uservices/userver/cmake/SetupBoost.cmake",
501500
"cmake/SetupBrotli.cmake":"taxi/uservices/userver/cmake/SetupBrotli.cmake",
502501
"cmake/SetupCAres.cmake":"taxi/uservices/userver/cmake/SetupCAres.cmake",
503502
"cmake/SetupCCTZ.cmake":"taxi/uservices/userver/cmake/SetupCCTZ.cmake",

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ set(USERVER_THIRD_PARTY_DIRS
201201

202202
init_debian_depends()
203203

204-
include(SetupBoost)
205204
include(SetupGTest)
206205

207206
if(USERVER_FEATURE_GRPC)

cmake/SetupBoost.cmake

Lines changed: 0 additions & 70 deletions
This file was deleted.

cmake/UserverRequireDWCAS.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ function(userver_target_require_dwcas target visibility)
9292
try_run(
9393
RUN_RESULT COMPILE_RESULT "${CMAKE_CURRENT_BINARY_DIR}/require_dwcas"
9494
"${USERVER_ROOT_DIR}/cmake/UserverRequireDWCAS.cpp"
95-
COMPILE_DEFINITIONS ${TEST_DEFINITIONS}
96-
LINK_LIBRARIES ${TEST_LIBRARIES}
95+
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIRS}"
96+
COMPILE_DEFINITIONS ${TEST_DEFINITIONS} LINK_LIBRARIES ${TEST_LIBRARIES}
9797
COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT
9898
)
9999

core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ file(GLOB_RECURSE INTERNAL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/internal/*.cpp
3737

3838
list(REMOVE_ITEM SOURCES ${INTERNAL_SOURCES})
3939

40+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options filesystem locale regex iostreams)
4041
find_package_required(ZLIB "zlib1g-dev")
4142

4243
find_package(Iconv REQUIRED)
@@ -138,6 +139,7 @@ if(USERVER_FEATURE_UBOOST_CORO)
138139
target_link_libraries(${PROJECT_NAME} PRIVATE userver-uboost-coro)
139140
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/uboost_coro/include)
140141
else()
142+
find_package(Boost REQUIRED CONFIG COMPONENTS context coroutine)
141143
target_link_libraries(${PROJECT_NAME} PRIVATE Boost::context)
142144
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/sys_coro/include)
143145
endif()

third_party/uboost_coro/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ if(UBOOST_CORO_USE_UCONTEXT)
9393
endif()
9494
endif()
9595

96-
97-
target_link_libraries(${PROJECT_NAME} PUBLIC userver-internal-compile-options)
96+
find_package(Boost REQUIRED CONFIG)
97+
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::boost userver-internal-compile-options)
9898
_userver_install_targets(COMPONENT core TARGETS ${PROJECT_NAME})

universal/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ list(REMOVE_ITEM SOURCES ${UNIT_TEST_SOURCES} ${BENCH_SOURCES} ${INTERNAL_SOURCE
2525
set(CMAKE_THREAD_PREFER_PTHREAD ON)
2626
set(THREADS_PREFER_PTHREAD_FLAG ON)
2727
find_package(Threads REQUIRED)
28+
find_package(
29+
Boost REQUIRED CONFIG
30+
COMPONENTS program_options filesystem regex stacktrace_basic
31+
OPTIONAL_COMPONENTS stacktrace_backtrace stacktrace_windbg
32+
)
2833
include(UserverRequireDWCAS) # Should be called after `find_package(Boost)`
2934

3035
message(STATUS "boost: ${Boost_VERSION_STRING}")
@@ -237,12 +242,6 @@ target_link_libraries(
237242
PUBLIC Threads::Threads userver-internal-sanitize-options userver-internal-compile-options
238243
PRIVATE Boost::filesystem Boost::program_options OpenSSL::Crypto OpenSSL::SSL
239244
)
240-
if(TARGET Boost::algorithm)
241-
target_link_libraries(
242-
${PROJECT_NAME}
243-
PUBLIC Boost::algorithm Boost::uuid Boost::random Boost::container
244-
)
245-
endif()
246245

247246
if(USERVER_CONAN)
248247
target_link_libraries(

0 commit comments

Comments
 (0)