From b3c031a65a7a1c17b3c0cb3afcd973c70106cf19 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Fri, 17 Apr 2020 02:19:19 +0900 Subject: [PATCH] [cppcoro] force static linkage * report error for clang-cl build with VC++ in VS 2019 will fail by the header file. --- ports/cppcoro/CMakeLists.txt | 15 +-------------- ports/cppcoro/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ports/cppcoro/CMakeLists.txt b/ports/cppcoro/CMakeLists.txt index 3f1a3ebae..f9bb7d702 100644 --- a/ports/cppcoro/CMakeLists.txt +++ b/ports/cppcoro/CMakeLists.txt @@ -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 " doesn't support clang-cl compiler") else() target_compile_options(cppcoro PUBLIC diff --git a/ports/cppcoro/portfile.cmake b/ports/cppcoro/portfile.cmake index c5d37445b..4d09df150 100644 --- a/ports/cppcoro/portfile.cmake +++ b/ports/cppcoro/portfile.cmake @@ -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