From e9e821f59c0856db304d14a853b7ae8e8ec94c5c Mon Sep 17 00:00:00 2001 From: Pierre Blanchard Date: Thu, 8 Feb 2024 15:52:43 +0000 Subject: [PATCH] Disable SVE on MacOS/Darwin Macs do not implement SVE yet and Darwin does not support it. Should solve #425 and #487. --- Configure.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Configure.cmake b/Configure.cmake index 26d86ad9..19a153f0 100644 --- a/Configure.cmake +++ b/Configure.cmake @@ -513,7 +513,9 @@ endif() option(SLEEF_DISABLE_SVE "Disable SVE" OFF) option(SLEEF_ENFORCE_SVE "Build fails if SVE is not supported by the compiler" OFF) -if(SLEEF_ARCH_AARCH64 AND NOT SLEEF_DISABLE_SVE) +# Darwin does not support SVE yet (see issue #474), +# therefore we disable SVE on Darwin systems. +if(SLEEF_ARCH_AARCH64 AND NOT SLEEF_DISABLE_SVE AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") string (REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${FLAGS_ENABLE_SVE}") CHECK_C_SOURCE_COMPILES(" #include