File tree Expand file tree Collapse file tree 7 files changed +11
-82
lines changed Expand file tree Collapse file tree 7 files changed +11
-82
lines changed Original file line number Diff line number Diff line change 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",
Original file line number Diff line number Diff line change @@ -201,7 +201,6 @@ set(USERVER_THIRD_PARTY_DIRS
201201
202202init_debian_depends()
203203
204- include (SetupBoost)
205204include (SetupGTest)
206205
207206if (USERVER_FEATURE_GRPC)
Load Diff This file was deleted.
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ file(GLOB_RECURSE INTERNAL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/internal/*.cpp
3737
3838list (REMOVE_ITEM SOURCES ${INTERNAL_SOURCES} )
3939
40+ find_package (Boost REQUIRED CONFIG COMPONENTS program_options filesystem locale regex iostreams)
4041find_package_required(ZLIB "zlib1g-dev" )
4142
4243find_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 )
140141else ()
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 )
143145endif ()
Original file line number Diff line number Diff line change @@ -93,6 +93,6 @@ if(UBOOST_CORO_USE_UCONTEXT)
9393 endif ()
9494endif ()
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} )
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ list(REMOVE_ITEM SOURCES ${UNIT_TEST_SOURCES} ${BENCH_SOURCES} ${INTERNAL_SOURCE
2525set (CMAKE_THREAD_PREFER_PTHREAD ON )
2626set (THREADS_PREFER_PTHREAD_FLAG ON )
2727find_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+ )
2833include (UserverRequireDWCAS) # Should be called after `find_package(Boost)`
2934
3035message (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
247246if (USERVER_CONAN)
248247 target_link_libraries (
You can’t perform that action at this time.
0 commit comments