a better way to define arm architecture

Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
This commit is contained in:
Michael Podvitskiy 2024-02-07 20:13:01 +01:00 committed by GitHub
parent 17f202ab7a
commit 1895235ae2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -850,8 +850,9 @@ endif()
set(ARCH_FLAGS "")
if ((APPLE AND CMAKE_OSX_ARCHITECTURES AND ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64")) OR
(((APPLE AND NOT CMAKE_OSX_ARCHITECTURES) OR NOT APPLE) AND (("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm") OR ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64") OR ("${CMAKE_GENERATOR_PLATFORM_LWR}" MATCHES "arm64"))))
if (CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "arm64" OR
(NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND
(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")))
message(STATUS "ARM detected")
if (MSVC)
add_compile_definitions(__ARM_NEON)