mirror of
https://github.com/boostorg/cobalt.git
synced 2026-01-19 04:02:16 +00:00
added libraries.json & cleaned up cmake.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
|
||||
if(BOOST_SUPERPROJECT_VERSION)
|
||||
set(BOOST_REQUESTS_VERSION ${BOOST_SUPERPROJECT_VERSION})
|
||||
set(BOOST_COBALT_VERSION ${BOOST_SUPERPROJECT_VERSION})
|
||||
endif()
|
||||
|
||||
project(boost_cobalt VERSION "${BOOST_COBALT_VERSION}" LANGUAGES CXX)
|
||||
@@ -26,7 +26,6 @@ if (NOT BOOST_COBALT_IS_ROOT)
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# 12 for cxx_std_20
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
|
||||
project(boost_cobalt VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ foreach(SRC ${ALL_EXAMPLES})
|
||||
if (NAME STREQUAL ticker)
|
||||
if (TARGET Boost::json)
|
||||
add_executable(boost_cobalt_example_${NAME} ${SRC} )
|
||||
target_link_libraries(boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::json Boost::url ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::json Boost::url OpenSSL::SSL)
|
||||
target_compile_definitions(boost_cobalt_example_${NAME} PUBLIC)
|
||||
endif()
|
||||
continue()
|
||||
@@ -41,6 +41,6 @@ foreach(SRC ${ALL_EXAMPLES})
|
||||
endif()
|
||||
|
||||
add_executable(boost_cobalt_example_${NAME} ${SRC})
|
||||
target_link_libraries(boost_cobalt_example_${NAME} PUBLIC Boost::cobalt ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(boost_cobalt_example_${NAME} PUBLIC Boost::cobalt OpenSSL::SSL)
|
||||
target_compile_definitions(boost_cobalt_example_${NAME} PUBLIC)
|
||||
endforeach()
|
||||
|
||||
18
meta/libraries.json
Normal file
18
meta/libraries.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"key": "cobalt",
|
||||
"name": "Cobalt",
|
||||
"authors": [
|
||||
"Klemens Morgenstern"
|
||||
],
|
||||
"maintainers": [
|
||||
"Klemens Morgenstern <klemens -dot- d -dot- morgenstern -at- gmail.com>"
|
||||
],
|
||||
"description": "Coroutines. Basic Algorithms & Types",
|
||||
"category": [
|
||||
"Concurrent",
|
||||
"Coroutines",
|
||||
"Awaitables",
|
||||
"Asynchronous"
|
||||
],
|
||||
"cxxstd": "20"
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
enable_testing()
|
||||
if(NOT TARGET tests)
|
||||
add_custom_target(tests)
|
||||
set_property(TARGET tests PROPERTY FOLDER _deps)
|
||||
endif()
|
||||
|
||||
add_library(boost_cobalt_static_tests concepts.cpp util.cpp)
|
||||
target_link_libraries(boost_cobalt_static_tests Boost::headers)
|
||||
target_compile_features(boost_cobalt_static_tests PUBLIC cxx_std_20)
|
||||
|
||||
target_link_libraries(boost_cobalt_static_tests Boost::cobalt)
|
||||
|
||||
add_executable(boost_cobalt_main main.cpp)
|
||||
add_executable(boost_cobalt_main_compile main_compile.cpp)
|
||||
@@ -16,7 +17,9 @@ 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)
|
||||
|
||||
add_test(NAME boost_cobalt-main COMMAND boost_cobalt_main)
|
||||
add_test(NAME boost_cobalt-basic_tests COMMAND boost_cobalt_basic_tests)
|
||||
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)
|
||||
|
||||
add_dependencies(tests boost_cobalt_main boost_cobalt_basic_tests boost_cobalt_static_tests)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user