File tree Expand file tree Collapse file tree 5 files changed +23
-18
lines changed Expand file tree Collapse file tree 5 files changed +23
-18
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ option(USERVER_FEATURE_CLICKHOUSE "Provide asynchronous driver for ClickHouse" $
106106option (USERVER_FEATURE_RABBITMQ "Provide asynchronous driver for RabbitMQ" ON )
107107option (USERVER_FEATURE_MYSQL "Provide asynchronous driver for MariaDB/MySQL" OFF )
108108option (USERVER_FEATURE_UNIVERSAL "Provide a universal utilities library that does not use coroutines" ON )
109+ option (USERVER_FEATURE_UBOOST_CORO "Use vendored boost context instead of a system one" ON )
109110
110111if (USERVER_FEATURE_GRPC)
111112 include (cmake/SetupProtobuf.cmake)
@@ -122,9 +123,17 @@ else()
122123 add_subdirectory ("${USERVER_THIRD_PARTY_DIRS} /boost_stacktrace" )
123124endif ()
124125
126+ if (USERVER_FEATURE_UBOOST_CORO)
127+ add_subdirectory (uboost_coro)
128+ else ()
129+ find_package (Boost REQUIRED COMPONENTS
130+ context
131+ coroutine
132+ )
133+ endif ()
134+
125135add_subdirectory (core "${CMAKE_BINARY_DIR} /userver/core" )
126136add_subdirectory ("${USERVER_THIRD_PARTY_DIRS} /compiler-rt" )
127- add_subdirectory (uboost_coro)
128137
129138if (USERVER_IS_THE_ROOT_PROJECT)
130139 add_subdirectory (tools/engine)
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ cmake_policy(SET CMP0067 NEW)
7272try_run (
7373 RUN_RESULT COMPILE_RESULT
7474 "${CMAKE_CURRENT_BINARY_DIR} /require_dwcas"
75- "${USERVER_ROOT_DIR} /cmake /RequireDWCAS.cpp"
75+ "${CMAKE_CURRENT_LIST_DIR} /RequireDWCAS.cpp"
7676 CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIR} "
7777 COMPILE_DEFINITIONS ${TEST_DEFINITIONS}
7878 LINK_LIBRARIES ${TEST_LIBRARIES}
Original file line number Diff line number Diff line change @@ -63,8 +63,6 @@ set(CMAKE_THREAD_PREFER_PTHREAD ON)
6363set (THREADS_PREFER_PTHREAD_FLAG ON )
6464find_package (Threads REQUIRED)
6565find_package (Boost REQUIRED COMPONENTS
66- context
67- coroutine
6866 program_options
6967 filesystem
7068 locale
@@ -147,16 +145,13 @@ if (USERVER_SANITIZE AND NOT CMAKE_BUILD_TYPE MATCHES "^Rel")
147145 target_link_libraries (${PROJECT_NAME} PUBLIC userver-compiler-rt-parts )
148146endif ()
149147
150- option (USERVER_FEATURE_UBOOST_CORO "Use vendored boost context instead of a system one" ON )
151-
152148target_link_libraries (${PROJECT_NAME}
153149 PUBLIC
154150 Threads::Threads
155151 Boost::locale
156152 sanitize-target
157153 CURL::libcurl
158154 PRIVATE
159- Boost::coroutine
160155 Boost::filesystem
161156 Boost::program_options
162157 Boost::iostreams
@@ -166,6 +161,7 @@ target_link_libraries(${PROJECT_NAME}
166161 OpenSSL::SSL
167162 ZLIB::ZLIB
168163)
164+
169165if (USERVER_FEATURE_UBOOST_CORO)
170166 target_link_libraries (${PROJECT_NAME}
171167 PRIVATE
Original file line number Diff line number Diff line change @@ -1507,11 +1507,11 @@ UTEST(HttpClient, TestConnectTo) {
15071507 const utest::SimpleServer http_server{cb};
15081508 auto http_client_ptr = utest::CreateHttpClient ();
15091509
1510- clients::http::ConnectTo connect_to (" 0.0.0.0:0 :127.0.0.1:" +
1510+ clients::http::ConnectTo connect_to (" 0.0.0.0:42 :127.0.0.1:" +
15111511 std::to_string (http_server.GetPort ()));
15121512 auto request = http_client_ptr->CreateRequest ()
15131513 .connect_to (connect_to)
1514- .post (" http://0.0.0.0:0 " , kTestData )
1514+ .post (" http://0.0.0.0:42 " , kTestData )
15151515 .retry (1 )
15161516 .http_version (clients::http::HttpVersion::k11)
15171517 .timeout (kTimeout );
Original file line number Diff line number Diff line change 22cmake
33git
44libbenchmark-dev
5- libboost-context1.67 -dev
6- libboost-coroutine1.67 -dev
7- libboost-filesystem1.67 -dev
8- libboost-iostreams1.67 -dev
9- libboost-locale1.67 -dev
10- libboost-program-options1.67 -dev
11- libboost-thread1.67 -dev
12- libboost-regex1.67 -dev
13- libboost1.67 -dev
5+ libboost-context1.71 -dev
6+ libboost-coroutine1.71 -dev
7+ libboost-filesystem1.71 -dev
8+ libboost-iostreams1.71 -dev
9+ libboost-locale1.71 -dev
10+ libboost-program-options1.71 -dev
11+ libboost-thread1.71 -dev
12+ libboost-regex1.71 -dev
13+ libboost1.71 -dev
1414libbson-dev
1515libcctz-dev
1616libcrypto++-dev
You can’t perform that action at this time.
0 commit comments