Skip to content

Commit e0aefc2

Browse files
committed
fix cmake: find_package(Boost CONFIG)
commit_hash:9cbee781244b553e667d421ef1c7e311b06eddf3
1 parent 95bd775 commit e0aefc2

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

cmake/install/userver-core-config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ find_package(userver REQUIRED COMPONENTS
88
universal
99
)
1010

11-
find_package(Boost REQUIRED COMPONENTS
11+
find_package(Boost REQUIRED CONFIG COMPONENTS
1212
locale
1313
iostreams
1414
)

cmake/install/userver-universal-config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ endif()
77
include("${USERVER_CMAKE_DIR}/ModuleHelpers.cmake")
88

99
find_package(Threads)
10-
find_package(Boost REQUIRED COMPONENTS
10+
find_package(Boost REQUIRED CONFIG COMPONENTS
1111
program_options
1212
filesystem
1313
regex

core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ file(GLOB_RECURSE INTERNAL_SOURCES
4444

4545
list (REMOVE_ITEM SOURCES ${INTERNAL_SOURCES})
4646

47-
find_package(Boost REQUIRED COMPONENTS
47+
find_package(Boost REQUIRED CONFIG COMPONENTS
4848
program_options
4949
filesystem
5050
locale
@@ -148,7 +148,7 @@ if (USERVER_FEATURE_UBOOST_CORO)
148148
${CMAKE_CURRENT_SOURCE_DIR}/uboost_coro/include
149149
)
150150
else()
151-
find_package(Boost REQUIRED COMPONENTS
151+
find_package(Boost REQUIRED CONFIG COMPONENTS
152152
context
153153
coroutine
154154
)

third_party/uboost_coro/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ if(UBOOST_CORO_USE_UCONTEXT)
103103
endif()
104104
endif()
105105

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

tools/congestion-control-emulator/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(userver-tool-congestion-control-emulator CXX)
22

33
file(GLOB_RECURSE SOURCES *.cpp)
44

5-
find_package(Boost REQUIRED COMPONENTS program_options)
5+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)
66

77
add_executable(${PROJECT_NAME} ${SOURCES})
88
target_link_libraries(${PROJECT_NAME}

tools/dns-resolver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(userver-tool-dns-resolver CXX)
22

33
file(GLOB_RECURSE SOURCES *.cpp)
44

5-
find_package(Boost REQUIRED COMPONENTS program_options)
5+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)
66

77
add_executable(${PROJECT_NAME} ${SOURCES})
88
target_link_libraries(${PROJECT_NAME}

tools/engine-perf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(userver-tool-engine-perf)
22

33
file(GLOB_RECURSE SOURCES *.cpp)
44

5-
find_package(Boost REQUIRED COMPONENTS program_options)
5+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)
66

77
add_executable(${PROJECT_NAME} ${SOURCES})
88
target_link_libraries(${PROJECT_NAME}

tools/http-client-perf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(userver-tool-http-client-perf CXX)
22

33
file(GLOB_RECURSE SOURCES *.cpp)
44

5-
find_package(Boost REQUIRED COMPONENTS program_options)
5+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)
66

77
add_executable(${PROJECT_NAME} ${SOURCES})
88
target_link_libraries(${PROJECT_NAME}

tools/netcat/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(userver-tool-netcat CXX)
22

33
file(GLOB_RECURSE SOURCES *.cpp)
44

5-
find_package(Boost REQUIRED COMPONENTS program_options)
5+
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)
66

77
add_executable(${PROJECT_NAME} ${SOURCES})
88
target_link_libraries(${PROJECT_NAME}

universal/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ list(REMOVE_ITEM SOURCES ${UNIT_TEST_SOURCES} ${BENCH_SOURCES} ${INTERNAL_SOURCE
3232
set(CMAKE_THREAD_PREFER_PTHREAD ON)
3333
set(THREADS_PREFER_PTHREAD_FLAG ON)
3434
find_package(Threads REQUIRED)
35-
find_package(Boost REQUIRED
35+
find_package(Boost REQUIRED CONFIG
3636
COMPONENTS
3737
program_options
3838
filesystem
@@ -41,7 +41,7 @@ find_package(Boost REQUIRED
4141
OPTIONAL_COMPONENTS
4242
stacktrace_backtrace
4343
)
44-
include(UserverRequireDWCAS) # Should be called after `find_package(Boost REQUIRED)`
44+
include(UserverRequireDWCAS) # Should be called after `find_package(Boost)`
4545

4646
message(STATUS "boost: ${Boost_VERSION_STRING}")
4747
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

0 commit comments

Comments
 (0)