[pcl] Backport MSVC optimizer workaround of openNURBS (#41606)

This commit is contained in:
WangWeiLin-MV 2024-10-29 17:32:19 +08:00 коммит произвёл GitHub
Родитель c1b381aafe
Коммит 1b63f25c4c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 36 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,28 @@
diff --git a/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp b/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
index 13584fbbdb3..e006d3a5667 100644
--- a/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
+++ b/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
@@ -666,9 +666,13 @@ std::size_t ON_SerialNumberMap::ActiveIdCount() const
return m_active_id_count;
}
-#if (_MSC_VER >= 1930 && _MSC_VER <= 1939)
+#if (_MSC_VER >= 1930 && _MSC_VER <= 1949)
// Solves internal compiler error on MSVC 2022
// (see https://github.com/microsoft/vcpkg/issues/19561)
+#define ON_VS2022_COMPILER_CRASH
+#endif
+
+#if defined(ON_VS2022_COMPILER_CRASH)
#pragma optimize("", off)
#endif
struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
@@ -722,7 +726,7 @@ struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
}
return e;
}
-#if (_MSC_VER >= 1930 && _MSC_VER <= 1939)
+#if defined(ON_VS2022_COMPILER_CRASH)
#pragma optimize("", on)
#endif

Просмотреть файл

@ -15,6 +15,7 @@ vcpkg_from_github(
io_ply.patch io_ply.patch
6053.diff # https://github.com/PointCloudLibrary/pcl/pull/6053 6053.diff # https://github.com/PointCloudLibrary/pcl/pull/6053
6990a3b0d7dd3c1ca04a1a473cc172a937418060.diff # https://github.com/PointCloudLibrary/pcl/pull/6105 6990a3b0d7dd3c1ca04a1a473cc172a937418060.diff # https://github.com/PointCloudLibrary/pcl/pull/6105
0012-msvc-optimizer-workaround.patch # backport pcl #6143 and #6154
) )
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS)

Просмотреть файл

@ -1,7 +1,7 @@
{ {
"name": "pcl", "name": "pcl",
"version": "1.14.1", "version": "1.14.1",
"port-version": 2, "port-version": 3,
"description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.", "description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.",
"homepage": "https://github.com/PointCloudLibrary/pcl", "homepage": "https://github.com/PointCloudLibrary/pcl",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

Просмотреть файл

@ -6894,7 +6894,7 @@
}, },
"pcl": { "pcl": {
"baseline": "1.14.1", "baseline": "1.14.1",
"port-version": 2 "port-version": 3
}, },
"pcre": { "pcre": {
"baseline": "8.45", "baseline": "8.45",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "57795e21c0c37576db6bfb1df3b134de461d10e0",
"version": "1.14.1",
"port-version": 3
},
{ {
"git-tree": "00b339d9b6b61b9f0742cfea4c482e70e9ac5ad8", "git-tree": "00b339d9b6b61b9f0742cfea4c482e70e9ac5ad8",
"version": "1.14.1", "version": "1.14.1",