mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 01:24:47 +08:00
[fastrtps] Replace xtime with _timespec64 for fixing error C2065 (#30823)
* fix xtime* * update version * update patch * update version --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
parent
f0b5a6b60a
commit
809266d51a
23
ports/fastrtps/fix-xtime.patch
Normal file
23
ports/fastrtps/fix-xtime.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7ca47ae..632c38b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -42,6 +42,18 @@ message(STATUS "Version: ${PROJECT_VERSION}")
|
||||
###############################################################################
|
||||
option(EPROSIMA_BUILD "Activate internal building" OFF)
|
||||
|
||||
+###############################################################################
|
||||
+# Replace xtime with _timespec64. 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.36.32528.95")
|
||||
+ file(READ "${PROJECT_SOURCE_DIR}/include/fastrtps/utils/TimedMutex.hpp" _contents)
|
||||
+ string(REPLACE "xtime*" "_timespec64*" _contents "${_contents}")
|
||||
+ file(WRITE "${PROJECT_SOURCE_DIR}/include/fastrtps/utils/TimedMutex.hpp" "${_contents}")
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
###############################################################################
|
||||
# Warning level
|
||||
###############################################################################
|
@ -7,6 +7,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
fix-find-package-asio.patch
|
||||
disable-symlink.patch
|
||||
fix-xtime.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
@ -69,4 +70,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "fastrtps",
|
||||
"version": "2.7.0",
|
||||
"port-version": 1,
|
||||
"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",
|
||||
|
@ -2426,7 +2426,7 @@
|
||||
},
|
||||
"fastrtps": {
|
||||
"baseline": "2.7.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"fawdlstty-libfv": {
|
||||
"baseline": "0.0.8",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b2d64bc038a30ea7ad49dc5cb923c0e13618281c",
|
||||
"version": "2.7.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "7a1b9df69d8a4219b390a65056d837dc6c0f385c",
|
||||
"version": "2.7.0",
|
||||
|
Loading…
Reference in New Issue
Block a user