From 1895235ae2844043e34590e09da9029a0a1961d0 Mon Sep 17 00:00:00 2001 From: Michael Podvitskiy Date: Wed, 7 Feb 2024 20:13:01 +0100 Subject: [PATCH] a better way to define arm architecture Co-authored-by: Jared Van Bortel --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74caa4287..6fb68df94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)