2023-04-14 12:48:43 +08:00
|
|
|
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")
|
2023-06-28 03:46:22 +08:00
|
|
|
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.37.32705.0")
|
2023-04-14 12:48:43 +08:00
|
|
|
+ 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
|
|
|
|
###############################################################################
|