diff options
| author | Aaron Gamache <17752104+agamache@users.noreply.github.com> | 2026-06-06 16:01:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-06 20:01:54 +0000 |
| commit | db60f64f8e2369c7e2fb006d52a1514404bf46eb (patch) | |
| tree | 43d58500b4ebffa9d05ee6bd666c823175ab1318 | |
| parent | f45d65381f7db431d0c01db525095fe7c996679a (diff) | |
Compile with -ffp-contract=off on arm64 macOS (#6584)
| -rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c23f0303e..3e0743c5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,6 +136,10 @@ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_OBJCXX_FLAGS_RELEASE "-O2 -DNDEBUG") endif() +# IEEE 754 compliant floating-point rounding on arm64 macOS +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_compile_options(-Xarch_arm64 -ffp-contract=off) +endif() if(NOT CMAKE_BUILD_TYPE ) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) |
