From 0e98a8fd87fb2e309d32b4934f7db7d2dea59208 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Mon, 4 Nov 2024 20:24:24 +0100 Subject: [PATCH] build: Disable class-memaccess compiler error when using eigen on ARM64 --- build-support/macros-and-definitions.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index 29fb24072..79631d7be 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -552,6 +552,11 @@ macro(process_options) if(${EIGEN3_FOUND}) set(ENABLE_EIGEN True) + # Prevent warning as error for ARM NEON PacketMath + if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64") + add_compile_options(-Wno-error=class-memaccess) + endif() + add_definitions(-DHAVE_EIGEN3) add_definitions(-DEIGEN_MPL2_ONLY) include_directories(${EIGEN3_INCLUDE_DIR})