https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4ae4590b6648f020e4ca9666fcd4b0abef66741f

commit 4ae4590b6648f020e4ca9666fcd4b0abef66741f
Author:     Jérôme Gardou <[email protected]>
AuthorDate: Thu Apr 29 22:28:33 2021 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Mon May 3 22:00:57 2021 +0200

    [CMAKE] Do not define _M_AMD64 when using amd64 clang-cl
---
 CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac31959a410..d1e1e82eac4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -215,7 +215,11 @@ Enable this if the module uses typeid or dynamic_cast. You 
will probably need to
             add_definitions(-DSARCH_PC98)
         endif()
     elseif(ARCH STREQUAL "amd64")
-        add_definitions(-D_M_AMD64 -D_AMD64_ -D__x86_64__ -D_WIN64)
+        # clang-cl defines this one for itself
+        if (NOT (MSVC AND CMAKE_C_COMPILER_ID STREQUAL "Clang"))
+            add_compile_definitions(_M_AMD64)
+        endif()
+        add_definitions(-D_AMD64_ -D__x86_64__ -D_WIN64)
     elseif(ARCH STREQUAL "arm")
         # _M_ARM is already defined by toolchain
         add_definitions(-D_ARM_ -D__arm__ -DWIN32)

Reply via email to