Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ports/microsoft-signalr/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
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.
Default-Features: default-features
Homepage: https://github.com/aspnet/SignalR-Client-Cpp
Expand Down
3 changes: 2 additions & 1 deletion ports/microsoft-signalr/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vcpkg_from_github(
REF v0.1.0-alpha1
SHA512 d37eea194b0352a08dd89ac7622bdd6224312ad48a31d8ab36627a8aaff5e795e3513ad010eed516703f6da842a95119c1a4a290b145a43e91ff80a37fff8676
HEAD_REF master
PATCHES remove-fno-rtti-compile-option.patch
)

vcpkg_check_features(
Expand All @@ -30,6 +31,6 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

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()
17 changes: 17 additions & 0 deletions ports/microsoft-signalr/remove-fno-rtti-compile-option.patch
Original file line number Diff line number Diff line change
@@ -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()