Skip to content

Commit

Permalink
fix cmake: find_package(Boost CONFIG)
Browse files Browse the repository at this point in the history
commit_hash:9cbee781244b553e667d421ef1c7e311b06eddf3
  • Loading branch information
Anton3 committed Nov 29, 2024
1 parent 95bd775 commit e0aefc2
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmake/install/userver-core-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ find_package(userver REQUIRED COMPONENTS
universal
)

find_package(Boost REQUIRED COMPONENTS
find_package(Boost REQUIRED CONFIG COMPONENTS
locale
iostreams
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/install/userver-universal-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif()
include("${USERVER_CMAKE_DIR}/ModuleHelpers.cmake")

find_package(Threads)
find_package(Boost REQUIRED COMPONENTS
find_package(Boost REQUIRED CONFIG COMPONENTS
program_options
filesystem
regex
Expand Down
4 changes: 2 additions & 2 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ file(GLOB_RECURSE INTERNAL_SOURCES

list (REMOVE_ITEM SOURCES ${INTERNAL_SOURCES})

find_package(Boost REQUIRED COMPONENTS
find_package(Boost REQUIRED CONFIG COMPONENTS
program_options
filesystem
locale
Expand Down Expand Up @@ -148,7 +148,7 @@ if (USERVER_FEATURE_UBOOST_CORO)
${CMAKE_CURRENT_SOURCE_DIR}/uboost_coro/include
)
else()
find_package(Boost REQUIRED COMPONENTS
find_package(Boost REQUIRED CONFIG COMPONENTS
context
coroutine
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/uboost_coro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ if(UBOOST_CORO_USE_UCONTEXT)
endif()
endif()

find_package(Boost REQUIRED)
find_package(Boost REQUIRED CONFIG)
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::boost userver-internal-compile-options)
_userver_install_targets(COMPONENT core TARGETS ${PROJECT_NAME})
2 changes: 1 addition & 1 deletion tools/congestion-control-emulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(userver-tool-congestion-control-emulator CXX)

file(GLOB_RECURSE SOURCES *.cpp)

find_package(Boost REQUIRED COMPONENTS program_options)
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion tools/dns-resolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(userver-tool-dns-resolver CXX)

file(GLOB_RECURSE SOURCES *.cpp)

find_package(Boost REQUIRED COMPONENTS program_options)
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion tools/engine-perf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(userver-tool-engine-perf)

file(GLOB_RECURSE SOURCES *.cpp)

find_package(Boost REQUIRED COMPONENTS program_options)
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion tools/http-client-perf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(userver-tool-http-client-perf CXX)

file(GLOB_RECURSE SOURCES *.cpp)

find_package(Boost REQUIRED COMPONENTS program_options)
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion tools/netcat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(userver-tool-netcat CXX)

file(GLOB_RECURSE SOURCES *.cpp)

find_package(Boost REQUIRED COMPONENTS program_options)
find_package(Boost REQUIRED CONFIG COMPONENTS program_options)

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
Expand Down
4 changes: 2 additions & 2 deletions universal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ list(REMOVE_ITEM SOURCES ${UNIT_TEST_SOURCES} ${BENCH_SOURCES} ${INTERNAL_SOURCE
set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(Boost REQUIRED
find_package(Boost REQUIRED CONFIG
COMPONENTS
program_options
filesystem
Expand All @@ -41,7 +41,7 @@ find_package(Boost REQUIRED
OPTIONAL_COMPONENTS
stacktrace_backtrace
)
include(UserverRequireDWCAS) # Should be called after `find_package(Boost REQUIRED)`
include(UserverRequireDWCAS) # Should be called after `find_package(Boost)`

message(STATUS "boost: ${Boost_VERSION_STRING}")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down

0 comments on commit e0aefc2

Please sign in to comment.