From 249f17e619df11675f484e3ff1e10a6331a77e6d Mon Sep 17 00:00:00 2001 From: BeastLe9enD Date: Sun, 7 Jul 2024 14:13:59 +0200 Subject: [PATCH] Add support for windows on arm compilation --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9a2cb3..c6af4ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,14 @@ enable_NDEBUG(CMAKE_CXX_FLAGS_MINSIZEREL) enable_NDEBUG(CMAKE_CXX_FLAGS_RELWITHDEBINFO) if (WIN32) - add_compile_options(/DUSE_SSE2 /DNOMINMAX /wd4996 /wd4267 /wd4244) + add_compile_options(/DNOMINMAX /wd4996 /wd4267 /wd4244) if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)") - add_compile_options(/arch:SSE2) + add_compile_options(/DUSE_SSE2 /arch:SSE2) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(ARM64)") + add_compile_options(-DUSE_NEON) + else() + message(WARNING "SIMD acceleration is disabled on ${CMAKE_SYSTEM_PROCESSOR}") endif() else() add_compile_options(-Wall -Werror)