aboutsummaryrefslogtreecommitdiff
path: root/ports/opencascade/fix-msvc-32bit-builds.patch
blob: 2fa76ffb00b89cdf9e4f42db068dcc1a70881c59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 adm/cmake/occt_defs_flags.cmake | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake
index 5484c67..203ca6b 100644
--- a/adm/cmake/occt_defs_flags.cmake
+++ b/adm/cmake/occt_defs_flags.cmake
@@ -16,6 +16,14 @@ if (MSVC)
   set (CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   /fp:precise")
 endif()
 
+# Turn off the "improved inline analyzer" that stalls on x86 release builds using MSVC 16.7 for 32-bit
+if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
+  if (MSVC)
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2DeepThoughtInliner-")
+    set (CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} /d2DeepThoughtInliner-")
+  endif()
+endif()
+
 # add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only)
 if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
   if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600)))