diff --git a/CMakeLists.txt b/CMakeLists.txt index 91684f9..d429fd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,10 @@ if(HAVE_NEON) if(MSVC) add_compile_definitions(__ARM_NEON__) elseif(NOT APPLE) - add_compile_options(-mfpu=neon) + check_c_compiler_flag(-mfpu=neon COMPILER_SUPPORTS_MFPU_NEON) + if(COMPILER_SUPPORTS_MFPU_NEON) + add_compile_options(-mfpu=neon) + endif() endif() endif()