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

[fastrtps] Fix the macro definition in thread #32921

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
23 changes: 23 additions & 0 deletions ports/fastrtps/fix_thread.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e4df1b..4de06dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,17 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
file(WRITE "${PROJECT_SOURCE_DIR}/include/fastrtps/utils/TimedMutex.hpp" "${_contents}")
endif()
endif()
-
+###############################################################################
+# Replace _Thrd_success with _Thrd_result::_Success. As a workround of the
+# unreleased version of MSVC, it will be deleted after release.
+###############################################################################
+if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.38.32926.95")
+ file(READ "${PROJECT_SOURCE_DIR}/include/fastrtps/utils/TimedMutex.hpp" _contents)
+ string(REPLACE "_Thrd_success" "_Thrd_result::_Success" _contents "${_contents}")
+ file(WRITE "${PROJECT_SOURCE_DIR}/include/fastrtps/utils/TimedMutex.hpp" "${_contents}")
+ endif()
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved
+endif()
###############################################################################
# Warning level
###############################################################################
1 change: 1 addition & 0 deletions ports/fastrtps/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
fix-find-package-asio.patch
disable-symlink.patch
fix-xtime.patch
fix_thread.patch
)

vcpkg_cmake_configure(
Expand Down
2 changes: 1 addition & 1 deletion ports/fastrtps/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fastrtps",
"version": "2.7.0",
"port-version": 2,
"port-version": 3,
"description": "Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium.",
"homepage": "https://www.eprosima.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@
},
"fastrtps": {
"baseline": "2.7.0",
"port-version": 2
"port-version": 3
},
"fawdlstty-libfv": {
"baseline": "0.0.8",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/fastrtps.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f4472f50314fa8337e636c1bb0b7bfbfce722a5",
"version": "2.7.0",
"port-version": 3
},
{
"git-tree": "443f550810af037dae538dc5555d7e069f2896ec",
"version": "2.7.0",
Expand Down