diff --git a/CMakeLists.txt b/CMakeLists.txt index 92660c6..a9e53ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,15 @@ catkin_package( ## Build ## ########### +# On ARM, the use of Eigen 3.4 with g++11 (both the versions in Jammy) causes a warning, which in turn causes +# the build to fail. Details are here: https://gitlab.com/libeigen/eigen/-/issues/2326. We can suppress the warning +# for ARM builds here. +if(Eigen3_VERSION VERSION_EQUAL 3.4 AND + CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND + CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu") + add_compile_options(-Wno-class-memaccess) +endif() + # Header-only package. Nothing to build. #############