[cppcoro] force static linkage

* report error for clang-cl

build with VC++ in VS 2019 will fail by the header file.
This commit is contained in:
Park DongHa 2020-04-17 02:19:19 +09:00
parent 6c23ad6d98
commit b3c031a65a
2 changed files with 2 additions and 14 deletions

View File

@ -75,10 +75,6 @@ elseif(WIN32)
include/cppcoro/net/socket_send_operation.hpp
include/cppcoro/net/socket_send_to_operation.hpp
)
set_target_properties(cppcoro
PROPERTIES
WINDOWS_EXPORT_ALL_SYMBOLS true
)
elseif(CMAKE_SYSTEM_NAME MATCHES Linux)
message(STATUS "using system: ${CMAKE_HOST_SYSTEM_VERSION}")
@ -163,16 +159,7 @@ PUBLIC
if(${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
if(WIN32)
target_compile_options(cppcoro
PUBLIC
/std:c++latest
-fms-compatibility -Xclang -fcoroutines-ts
)
target_compile_definitions(cppcoro
PUBLIC
_RESUMABLE_FUNCTIONS_SUPPORTED
)
message(FATAL_ERROR "<experimental/resumable> doesn't support clang-cl compiler")
else()
target_compile_options(cppcoro
PUBLIC

View File

@ -1,6 +1,7 @@
# for Linux, the port requires libc++ and Clang. see #10693
vcpkg_fail_port_install(ON_TARGET "uwp" "linux")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH