Skip to content

Commit

Permalink
Merge pull request InsightSoftwareConsortium#4670 from InsightSoftwar…
Browse files Browse the repository at this point in the history
…eConsortium/eigen-warnings

COMP: suppress 5 clang warnings from eigen headers
  • Loading branch information
thewtex authored May 20, 2024
2 parents 5279be5 + 226f647 commit 8e5abbd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Modules/ThirdParty/Eigen3/src/itk_eigen.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,23 @@ target_link_libraries(main PUBLIC Eigen3::Eigen)
#define ITK_EIGEN(x) ITK_EIGEN_STR(itkeigen/Eigen/x)
#endif

// Disable these warnings which occur only in Eigen and not elsewhere in ITK.
#if defined(__clang__) && defined(__has_warning)
#if __has_warning("-Walloca")
#pragma clang diagnostic ignored "-Walloca"
#endif
#if __has_warning("-Wused-but-marked-unused")
#pragma clang diagnostic ignored "-Wused-but-marked-unused"
#endif
#if __has_warning("-Wunused-template")
#pragma clang diagnostic ignored "-Wunused-template"
#endif
#if __has_warning("-Wmissing-noreturn")
#pragma clang diagnostic ignored "-Wmissing-noreturn"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#endif

#endif

0 comments on commit 8e5abbd

Please sign in to comment.