Skip to content

Commit 76d09b8

Browse files
committed
COMP: Suppress MSVC C4750 dashboard warning from vendored Eigen3
Tridiagonalization.h emits C4750 ('function with _alloca() inlined into a loop') under MSVC whenever an ITK consumer instantiates the symmetric eigen-decomposition path. The warning is benign (Eigen's intentional small-allocation alloca path) but cannot be addressed inside ITK and fails CDash because the dashboard treats any warning as fatal. The previous attempt to set CMAKE_CXX_FLAGS in the vendored Eigen CMakeLists was a no-op (Eigen is header-only, so no .cxx file picks up the flag) and the alternative -- attaching /wd4750 to the eigen_internal INTERFACE library -- would propagate to ITKCommon (which DEPENDS on ITKEigen3) and from there to most of the toolkit, suppressing C4750 for non-Eigen ITK code too. Both rejected per @blowekamp. Instead, extend the existing 'Modules/ThirdParty/Eigen3/.*warning:.*' CTestCustom regex with a sibling that matches MSVC's 'warning C####:' form. Compiler still emits the warning so reviewers see it in build logs, but the dashboard ignores it for warning-count purposes -- exactly the same scope the GCC/Clang side has had since this exception was added.
1 parent 66916d6 commit 76d09b8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CMake/CTestCustom.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ 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 the Tridiagonalization.h C4750 ('_alloca() inlined into a loop') and
137+
# similar Eigen-internal MSVC warnings do not fail the dashboard.
138+
".*Modules.ThirdParty.Eigen3.*warning C[0-9]+:.*"
135139

136140
# CircleCI distcc warnings
137141
".*WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED.*"

0 commit comments

Comments
 (0)