File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ check_cxx_compiler_flag(-fcoroutines _CXX_COROUTINES_SUPPORTS_CORO_FLAG)
115115
116116if (_CXX_COROUTINES_SUPPORTS_MS_FLAG)
117117 set (_CXX_COROUTINES_EXTRA_FLAGS "/await" )
118+ if (CMAKE_CL_64 )
119+ list (APPEND _CXX_COROUTINES_EXTRA_FLAGS "/await:heapelide" )
120+ endif ()
118121elseif (_CXX_COROUTINES_SUPPORTS_TS_FLAG)
119122 set (_CXX_COROUTINES_EXTRA_FLAGS "-fcoroutines-ts" )
120123elseif (_CXX_COROUTINES_SUPPORTS_CORO_FLAG)
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ if(WIN32)
144144 socket_recv_from_operation.cpp
145145 )
146146 list (APPEND sources ${win32Sources} )
147+
148+ list (APPEND libraries Ws2_32 Mswsock Synchronization)
149+ list (APPEND compile_options /EHsc)
147150endif ()
148151
149152add_library (cppcoro
@@ -158,6 +161,7 @@ target_include_directories(cppcoro PUBLIC
158161 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
159162 $<INSTALL_INTERFACE:include >)
160163target_compile_features (cppcoro PUBLIC cxx_std_20)
164+ target_compile_options (cppcoro PUBLIC ${compile_options} )
161165
162166find_package (Coroutines COMPONENTS Experimental Final REQUIRED)
163167target_link_libraries (cppcoro PUBLIC std::coroutines)
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/doctest/doctest.cmake)
55
66find_package (Threads REQUIRED)
77
8- add_library (tests-main SHARED
8+ add_library (tests-main STATIC
99 main.cpp
1010 counted.cpp
1111)
You can’t perform that action at this time.
0 commit comments