Skip to content

Commit

Permalink
a better way to define arm architecture
Browse files Browse the repository at this point in the history
Co-authored-by: Jared Van Bortel <[email protected]>
  • Loading branch information
Xarbirus and cebtenzzre authored Feb 7, 2024
1 parent 17f202a commit 1895235
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1895235

Please sign in to comment.