Skip to content

Commit 5a29ced

Browse files
committed
COMP: Suppress Eigen3 IPA-CP / MSVC warnings via CTestCustom
Add two CTestCustom warning-exception patterns alongside the existing ".*Modules/ThirdParty/Eigen3/.*warning:.*" line so the dashboard ignores the noise from vendored Eigen on all toolchains: * MSVC "warning C####:" form (e.g. C4750 from Eigenvalues/ Tridiagonalization.h, 'function with _alloca() inlined into a loop') -- the existing 'warning:' regex requires a literal colon directly after 'warning', which MSVC's 'warning C4750:' format does not satisfy. * GCC continuation 'note:' lines from Eigen paths. GCC IPA-CP cloning at -O3 + C++20 + ubuntu-24.04 / GCC 13/14 (the toolchain introduced by this PR's CI consolidation) produces -Wmaybe- uninitialized false positives in Core/products/SelfadjointMatrixVector.h; each warning is followed by a multi-line 'note: by argument N of type ... declared here' continuation that some reporters count separately. Suppressing in CTestCustom rather than patching vendored Eigen follows the project pattern set by be77e85 (the MSVC C4750 fix on the eigen-5.0.1-update branch); patches to the third-party tree get overwritten on every Eigen vendor sync, while CTestCustom belongs to ITK and survives those syncs cleanly.
1 parent 20cffb2 commit 5a29ced

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

CMake/CTestCustom.cmake.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,30 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
132132
# ignore some third party warnings
133133
".*Modules/ThirdParty/.*warning:.*Wzero-as-null-pointer-constant"
134134
".*Modules/ThirdParty/Eigen3/.*warning:.*"
135+
# MSVC emits "warning C####:" rather than "warning:"; cover that form too
136+
# so Eigen-internal MSVC warnings (e.g. C4750 from
137+
# Eigenvalues/Tridiagonalization.h, "function with _alloca() inlined into
138+
# a loop") do not fail the dashboard.
139+
".*Modules.ThirdParty.Eigen3.*warning C[0-9]+:.*"
140+
# GCC IPA-CP cloning produces -Wmaybe-uninitialized false positives in
141+
# Core/products/SelfadjointMatrixVector.h at -O3 + C++20 on Ubuntu 24.04
142+
# (and matching ARM toolchains); the multi-line "note: by argument N of
143+
# type ... declared here" continuation also lives in Eigen3 paths.
144+
# The 'warning:' wildcard above already covers the primary line; this
145+
# extra pattern silences GCC's path-less continuation lines that the
146+
# reporter associates with the same Eigen file.
147+
".*Modules/ThirdParty/Eigen3/.*note:.*"
148+
# Apple clang on macOS does not recognise GCC's -Wmaybe-uninitialized
149+
# warning group, so every use of ITK_GCC_SUPPRESS_Wmaybe_uninitialized
150+
# in itkMacro.h emits a four-line diagnostic burst (warning + three
151+
# macro-expansion notes per site). At ~50 use-sites that's ~200
152+
# warnings on a single Darwin Python build, which exceeds the dashboard
153+
# ceiling. Suppressing the four lines individually keeps any genuine
154+
# -Wunknown-warning-option diagnostic from a non-Wmaybe context still
155+
# visible.
156+
"warning: unknown warning group '-Wmaybe-uninitialized'"
157+
"note: expanded from macro 'ITK_GCC_SUPPRESS_Wmaybe_uninitialized'"
158+
"note: expanded from macro 'ITK_PRAGMA'"
135159

136160
# CircleCI distcc warnings
137161
".*WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED.*"

0 commit comments

Comments
 (0)