-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pcl] Backport MSVC optimizer workaround of openNURBS (#41606)
- Loading branch information
1 parent
c1b381a
commit 1b63f25
Showing
5 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters