Skip to content

Commit

Permalink
Fixing packages with no direct Eigen dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrton04 committed Sep 13, 2024
1 parent f0847b9 commit 3f63f4b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
4 changes: 2 additions & 2 deletions fuse_constraints/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ endif()
# 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")
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND
CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")
add_compile_options(-Wno-class-memaccess)
endif()

Expand Down
4 changes: 2 additions & 2 deletions fuse_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ add_compile_options(-Wall -Werror)
# 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")
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND
CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")
add_compile_options(-Wno-class-memaccess)
endif()

Expand Down
4 changes: 2 additions & 2 deletions fuse_models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ add_compile_options(-Wall -Werror)
# 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")
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND
CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")
add_compile_options(-Wno-class-memaccess)
endif()

Expand Down
15 changes: 10 additions & 5 deletions fuse_publishers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ add_compile_options(-Wall -Werror)

# 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)
# for ARM builds here. However, this package does not depend directly upon Eigen, but includes headers from other
# packages that do. So to prevent the error, we need to find Eigen and then check the version.
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND
CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")

find_package(Eigen3)

if(Eigen3_FOUND AND Eigen3_VERSION VERSION_EQUAL 3.4)
add_compile_options(-Wno-class-memaccess)
endif()
endif()

# fuse_publishers library
Expand Down
15 changes: 10 additions & 5 deletions fuse_viz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ add_compile_options(-Wall -Werror)

# 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)
# for ARM builds here. However, this package does not depend directly upon Eigen, but includes headers from other
# packages that do. So to prevent the error, we need to find Eigen and then check the version.
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0 AND
CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")

find_package(Eigen3)

if(Eigen3_FOUND AND Eigen3_VERSION VERSION_EQUAL 3.4)
add_compile_options(-Wno-class-memaccess)
endif()
endif()

catkin_package(
Expand Down

0 comments on commit 3f63f4b

Please sign in to comment.