Skip to content

Commit

Permalink
optional link to unit_test_framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Oct 23, 2023
1 parent 7d219e7 commit ab7083c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ else()
if (NOT BOOST_COBALT_BUILD_INLINE)
find_package(Threads REQUIRED)
# Boost 1.82 is the first with a Boost.ASIO with necessary support
find_package(Boost REQUIRED COMPONENTS system OPTIONAL_COMPONENTS json context url)
find_package(Boost REQUIRED COMPONENTS system OPTIONAL_COMPONENTS json context url unit_test_framework)
if (BOOST_COBALT_USE_BOOST_CONTAINER)
find_package(Boost REQUIRED container)
endif()
Expand Down
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ target_link_libraries(boost_cobalt_main Boost::cobalt)
target_link_libraries(boost_cobalt_main_compile Boost::cobalt)
target_link_libraries(boost_cobalt_basic_tests Boost::cobalt)

if (TARGET Boost::unit_test_framework)
target_link_libraries(boost_cobalt_basic_tests Boost::unit_test_framework)
endif()

add_test(NAME boost_cobalt_main COMMAND boost_cobalt_main)
add_test(NAME boost_cobalt_basic_tests COMMAND boost_cobalt_basic_tests)
target_compile_features(boost_cobalt PUBLIC cxx_std_20)
Expand Down

0 comments on commit ab7083c

Please sign in to comment.