Skip to content

Commit 8ae5510

Browse files
[cmake] fixed up cmake, added link to ws2_32
1 parent 69867b8 commit 8ae5510

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ if (NOT BOOST_COBALT_IS_ROOT)
5151
Boost::circular_buffer
5252
Boost::config
5353
Boost::core
54+
Boost::endian
5455
Boost::intrusive
5556
Boost::mp11
5657
Boost::preprocessor
5758
Boost::smart_ptr
59+
Boost::static_string
5860
Boost::system
5961
Boost::throw_exception
6062
Boost::variant2
@@ -70,6 +72,10 @@ if (NOT BOOST_COBALT_IS_ROOT)
7072
target_compile_definitions(boost_cobalt PUBLIC _WIN32_WINNT=0x0601)
7173
endif()
7274

75+
if(MINGW)
76+
target_link_libraries(boost_cobalt PUBLIC ws2_32)
77+
endif()
78+
7379
if (BOOST_COBALT_USE_BOOST_CONTAINER)
7480
target_link_libraries(boost_cobalt PUBLIC Boost::container)
7581
target_compile_definitions(boost_cobalt PUBLIC BOOST_COBALT_USE_BOOST_CONTAINER_PMR=1 )
@@ -102,7 +108,7 @@ if (NOT BOOST_COBALT_IS_ROOT)
102108
src/io/acceptor.cpp
103109
)
104110

105-
target_link_libraries(boost_cobalt_io PUBLIC boost_cobalt)
111+
target_link_libraries(boost_cobalt_io PUBLIC boost_cobalt )
106112
target_compile_definitions(boost_cobalt_io PRIVATE BOOST_COBALT_IO_SOURCE=1)
107113
add_library(Boost::cobalt::io ALIAS boost_cobalt_io)
108114

@@ -199,6 +205,14 @@ else()
199205
target_compile_features(boost_cobalt PUBLIC cxx_std_20)
200206
add_library(Boost::cobalt ALIAS boost_cobalt)
201207

208+
if (MSVC)
209+
target_compile_definitions(boost_cobalt PUBLIC _WIN32_WINNT=0x0601)
210+
endif()
211+
212+
if(MINGW)
213+
target_link_libraries(boost_cobalt PUBLIC ws2_32)
214+
endif()
215+
202216
if(BUILD_SHARED_LIBS)
203217
target_compile_definitions(boost_cobalt PUBLIC BOOST_COBALT_DYN_LINK=1)
204218
else()

doc/reference/experimental/context.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[#context]
22
== cobalt/experimental/context.hpp
33

4-
WARNING: This is (most likely) undefined behaviour, since the violates a precondition in the standard. A paper to address this can be found here (https://isocpp.org/files/papers/P3203R0.html).
4+
WARNING: This is undefined behaviour, since the violates a precondition in the standard.
55

66
This header provides `experimental` support for using `boost.fiber` based stackful coroutines
77
as if they were C++20 coroutines. That is, they can use `awaitables` by being able to be put into a `coroutine_handle`.
8-
Likewise the implementation uses a C++20 coroutine promise and runs is as if it was a C++20 coroutine.
8+
Like-wise the implementation uses a C++20 coroutine promise and runs is as if it was a C++20 coroutine.
99

1010
[source,cpp]
1111
----

0 commit comments

Comments
 (0)