[microsoft-signalr] Fix build error on Linux (#14872)

* [microsoft-signalr] Fix build failed on Linux

* Nicole CRs

Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
NancyLi1013 2020-12-04 05:56:56 +08:00 committed by GitHub
parent ef0c3036fc
commit ecba240490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Source: microsoft-signalr Source: microsoft-signalr
Version: 0.1.0-alpha1-1 Version: 0.1.0-alpha1
Port-Version: 2
Description: C++ Client for ASP.NET Core SignalR. Description: C++ Client for ASP.NET Core SignalR.
Default-Features: default-features Default-Features: default-features
Homepage: https://github.com/aspnet/SignalR-Client-Cpp Homepage: https://github.com/aspnet/SignalR-Client-Cpp

View File

@ -4,6 +4,7 @@ vcpkg_from_github(
REF v0.1.0-alpha1 REF v0.1.0-alpha1
SHA512 d37eea194b0352a08dd89ac7622bdd6224312ad48a31d8ab36627a8aaff5e795e3513ad010eed516703f6da842a95119c1a4a290b145a43e91ff80a37fff8676 SHA512 d37eea194b0352a08dd89ac7622bdd6224312ad48a31d8ab36627a8aaff5e795e3513ad010eed516703f6da842a95119c1a4a290b145a43e91ff80a37fff8676
HEAD_REF master HEAD_REF master
PATCHES remove-fno-rtti-compile-option.patch
) )
vcpkg_check_features( vcpkg_check_features(
@ -30,6 +31,6 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(COPY ${SOURCE_PATH}/third-party-notices.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/microsoft-signalr) file(COPY ${SOURCE_PATH}/third-party-notices.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
vcpkg_copy_pdbs() vcpkg_copy_pdbs()

View File

@ -0,0 +1,17 @@
diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt
index 42d64d3..10fa72f 100644
--- a/src/signalrclient/CMakeLists.txt
+++ b/src/signalrclient/CMakeLists.txt
@@ -58,10 +58,10 @@ else()
target_compile_options(signalrclient PRIVATE -Wall)
endif()
- # GCC on OSX has a bug with exceptions and no-rtti that can cause crashes
- if(NOT APPLE)
+ # boost-asio (a dependency) doesn't support fno-rtti anymore
+ if(0)
target_compile_options(signalrclient PRIVATE -fno-rtti)
endif()
target_compile_options(signalrclient PRIVATE -Wextra -Wpedantic -Wno-unknown-pragmas)
endif()