https://git.reactos.org/?p=reactos.git;a=commitdiff;h=70bcd0fc6b91c2535d882…
commit 70bcd0fc6b91c2535d8821150da66318f4295ca1
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Nov 23 17:37:59 2019 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Nov 24 09:26:59 2019 +0100
[CMAKE] Disable EH4 for x64 and VS versions 16.3+
This fixes x64 build with latest VS 2019
See
https://developercommunity.visualstudio.com/content/problem/746534/visual-c…
---
sdk/cmake/msvc.cmake | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index 419984b5d11..472275ae279 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -64,6 +64,13 @@ if(MSVC_VERSION GREATER 1899)
add_compile_flags("/Zc:threadSafeInit-")
endif ()
+# HACK: Disable use of __CxxFrameHandler4 on VS 16.3+ (x64 only)
+# See
https://developercommunity.visualstudio.com/content/problem/746534/visual-c…
+if(ARCH STREQUAL "amd64" AND MSVC_VERSION GREATER 1922)
+ add_compile_flags("/d2FH4-")
+ add_link_options("/d2:-FH4-")
+endif ()
+
# Generate Warnings Level 3
add_compile_flags("/W3")