diff --git a/CMakeLists.txt b/CMakeLists.txt index f77a884..de7f1c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,8 @@ if(ENABLE_OPENMP) endif() endif() -option(DISABLE_FMA "Disable FMA operations for slightly slower, but symmetric floating-point arithmetics." OFF) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +option(DISABLE_FMA "Disable FMA operations for slightly slower, but symmetric floating-point arithmetics." ON) if(DISABLE_FMA) if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") target_compile_options(amun.x PRIVATE "-mno-fma;-mno-fma4") @@ -91,6 +92,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC") target_compile_options(amun.x PRIVATE "-Mnofma") endif() endif() +endif() option(ENABLE_SIGNALS "Enables signal handler support." ON) if(ENABLE_SIGNALS)