Skip to content

Conversation

@blowekamp
Copy link
Member

Description

This PR addresses shadow warnings from the third-party Eigen3 library that appear in CDash build reports.

Changes

  • Added CTest warning suppression for Modules/ThirdParty/Eigen3 warnings
  • Specifically targets shadow warnings like [-Wshadow-uncaptured-local] from Eigen's GenericPacketMath.h

Background

The warnings originate from Eigen 3.4.90 in lines like:

// GenericPacketMath.h:655 - lambda parameter 'a' shadows function parameter 'a'
return pminmax_impl<NaNPropagation, IsInteger>::run(a, b, 
  EIGEN_BINARY_OP_NAN_PROPAGATION(Packet, (pmin<Packet>)));

These are third-party library warnings outside ITK's control and should be suppressed to reduce noise in build reports while maintaining strict warning standards for ITK's own code.

Testing

  • Follows existing pattern of suppressing third-party warnings in CTestCustom.cmake.in
  • No functional changes to ITK code

Add CTest suppression for warnings from Modules/ThirdParty/Eigen3, including shadow warnings, to reduce noise from third-party code in ITK builds.
@github-actions github-actions bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots labels Aug 15, 2025
@seanm
Copy link
Contributor

seanm commented Aug 15, 2025

I've already fixed this warning upstream BTW, so we could also just update our eigen.

eigen being header-only makes things trickier since you'll often get warnings ultimately from it, but in your own source files.

Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Fixing warnings upstream is welcome, but it is only a temporary fix. New warnings are bound to appear over time.

@blowekamp
Copy link
Member Author

Updating from upstreams is a preferred solution.

@blowekamp blowekamp closed this Aug 15, 2025
hjmjohnson added a commit that referenced this pull request Sep 24, 2025
Resolves: #5484
Replaces: #5482

Add documentation for the process of updating Eigen from the upstream
repo into the local ITK copy with ITK specific build support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants