CTestCustom.cmake
Go to the documentation of this file.
1 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000)
2 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)
3 
4 list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
5  # Issues in third party glut library
6  VTK::RenderingExternalCxx-TestGLUTRenderWindow
7  VTK::IOVPICCxx-TestVPICReader
8  VTK::RenderingFreeTypeFontConfigCxx-TestSystemFontRendering
9  VTK::GeovisGDALCxx-TestRasterReprojectionFilter
10 
11  # The PLY code does out of range ops but that is just how
12  # it is architected currently. It stores every value into
13  # uint, int, and double but typically only uses the
14  # value that makes sense for the type read in. Code needs
15  # to be reworked eventually but the out of range values
16  # are likely not being used.
17  VTK::IOPLYCxx-TestPLYWriter
18  VTK::IOPLYCxx-TestPLYWriterString
19  VTK::IOPLYCxx-TestPLYReaderTextureUVPoints
20  VTK::IOPLYCxx-TestPLYReaderTextureUVFaces
21 
22  # TestLinePlotDouble intentionally uses very large doubles
23  # even though the implementation of the class is largely
24  # float. Fixing this requires reworking a few classes to
25  # use doubles everywhere (which they generally should)
26  # when that is done this can be removed.
27  # The key classes impacted are vtkPlotPoints and the
28  # Draw calls in Context2D
29  VTK::ChartsCoreCxx-TestLinePlotDouble
30 
31  # loguru looks like it leaks the thread name but apparently
32  # it eventually does free the memory. See
33  # https://github.com/emilk/loguru/issues/132
34  # for some reason only this test seems to report it
35  VTK::FiltersParallelDIY2Cxx-TestRedistributeDataSetFilter
36 )
37 
38 list(APPEND CTEST_CUSTOM_WARNING_MATCH
39  "{standard input}:[0-9][0-9]*: Warning: ")
40 
41 list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
42  # classes that have been marked deprecated
43  # and will be removed in the future
44  # To be remove din VTK 9.0
45  "vtkTemporalStreamTracer"
46 
47  # Java compilation warnings that don't matter.
48  "^1 warning$"
49  "bootstrap class path not set in conjunction with -source"
50 
51  # OSX has deprecated openGL but we still use it
52  # and probably will not update the code but replace it
53  # with vulklan/moltenVK in the future
54  "Cocoa.*deprecated"
55  "NSOpenGL.*deprecated"
56 
57  # C4275 carries with it a note that we don't care about. std::exception is
58  # the main culprit here.
59  "vcruntime_exception.h.*: note: see declaration of 'std::exception'"
60 
61  # C4702 warning (unreachable code) caused by intentional abort() used
62  # in test which prevents the return statement from being called.
63  "TestLoggerDisableSignalHandler.*unreachable code"
64 
65  # GetVersion is deprecated, but its use is OK.
66  "sysinfoapi.h.*: note: see declaration of 'GetVersion'"
67 
68  # Suppress notes from template instantiation backtraces.
69  "note: see reference to (class|function) template instantiation"
70  "note: while compiling class template member function"
71 
72  # This is secondary output from clang, not indicating the warning per se.
73  "[0-9]* warnings? generated"
74  "note: \\(skipping [0-9]* expansions in backtrace"
75  "note: expanded from (here|macro)"
76 
77  # This is secondary output from MSVC, not indicate the warning per se.
78  "note: see declaration of"
79  "note: see previous definition of"
80 
81  # Ignore macro expansion lines from GCC
82  "note: in expansion of macro"
83 
84  # function cast in vtkLogger/loguru
85  "vtkLogger.cxx.*: warning: cast between incompatible function types"
86 
87  # Qt headers cause C4127 warnings with MSVC. Nothing we can do to fix them.
88  "[Qq]t([Cc]ore|[Gg]ui|[Tt]est|[Ww]idgets).*(warning|note)"
89  # Qt has some functions marked as `__forceinline` which MSVC refuses to inline.
90  "[Qq]t.*warning C4714"
91  "[Qq]t.*note: see declaration of"
92 
93  # Python notes triggered from MPI4Py Cython-generated code.
94  "include/python3.*: note:"
95 
96  # macOS warnings about dependencies htat are newer than the CI target
97  # version.
98  "ld: warning: dylib \\(/Applications/Xcode.*\\.app/Contents/Developer/Library/Frameworks/.*\\) was built for newer macOS version \\(.*\\) than being linked \\(.*\\)"
99 
100  # Warning notes from Xcode.
101  "/Applications/Xcode.*: note:"
102 
103  # Ignore moc-generated code (and rcc and uic).
104  "\\.dir[/\\\\][^/\\\\]*_autogen"
105 
106  # Intel compilers warn about large functions, but we don't usually care.
107  "remark #11074: Inlining inhibited by limit (max-total-size|max-size)"
108  # Ignore the suggestion line for more information too.
109  "remark #11076: To get full report use"
110 
111  # clang-tidy ignores
112  "vtkParse.tab.c.*bugprone-sizeof-expression"
113  "vtkParse.tab.c.*bugprone-suspicious-include"
114  "mocs_compilation.cpp.*bugprone-suspicious-include"
115  "vtkkwiml/test/test_.*: warning: .* \\[modernize-redundant-void-arg\\]"
116 
117  # Ignore warnings from the standard library.
118  "warning:.*__builtin_memcpy.*stringop-overflow="
119  "note: at offset .* into destination object"
120 
121  # Ignore some tidy warnings from wrapper code.
122  "vtk[^\\.]+(Java|Python).cxx:.*\\[(readability-redundant-string-init)\\]"
123 
124  # Ignore some doxygen warnings
125  "warning: documented symbol 'template class .*' was not declared or defined."
126  "vtkContext2D.h:.*: warning: argument '.*' of command @param is not found in the argument list of vtkContext2D::DrawMarkers"
127  "vtkMultiThreshold.h:.*: warning: argument '.*' of command @param is not found in the argument list of vtkMultiThreshold::AddIntervalSet"
128  "QQuickVTKRenderWindow.h:.*: warning: QQuickVTKRenderWindow::captureScreenshot has @param documentation sections but no arguments"
129  "vtkInherits.h:.*: warning: documented symbol 'static vtk::ParentClasses.*::value' was not declared or defined."
130  "vtkPolyhedron.h:.*: warning: vtkPolyhedron::GetCellFaces has @param documentation sections but no arguments"
131 
132  # Ignore bits from gcc-12 stdlib. There seem to be some serious issues in GCC
133  # 12 diagnostics. These come from the `quay.io/pypa/manylinux_2_28_x86_64`
134  # container as of now.
135  "/opt/rh/gcc-toolset-12"
136 
137  # GCC 10.1 contains a bugfix for an error in previous GCC versions that
138  # resulted in a class zero-sized subobject to be passed incorrectly when
139  # compiled as C++17 or C++20 in versions of GCC prior to 10.1. GCC 10.1 fixes
140  # this by forcing the C++14 implementation and issuing a warning.
141  "when C\\+\\+17 is enabled changed to match C\\+\\+14 in GCC 10.1"
142  )
143 
144 set(cdash_show_third_party_warnings "")
145 if (NOT cdash_show_third_party_warnings)
146  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
147  # issue with exodus but exodus is not included in the note
148  # should these issues get fixed in exodus then remove this
149  # suppression
150  "note: '__builtin___snprintf_chk'"
151 
152  # HDF5 lex/yacc sources compilation lacks the "ThirdParty" part of the path.
153  "hl/src/H5LT(parse|analyze)"
154 
155  # Suppress ThirdParty source code from displaying warnings.
156  "[Tt]hird[Pp]arty"
157 
158  # Suppress MetaIO warnings.
159  "MetaIO/vtkmetaio"
160 
161  # clang will often give multiline warnings from macro expansions,
162  # where the first part has "warning:" and subsequent parts have "note:"
163  # and those will sometimes expand into systems headers. When this occurs
164  # for ThirdParty code, we want it suppressed too. Do so here for headers within Xcode.
165  "Xcode\\.app/Contents/Developer.+note:"
166 
167  # Suppress Remote module source code from displaying warnings.
168  # Suppress modules individually as just "Remote" is a common pattern
169  "[Rr]emote.[Mm]oment[Ii]nvariants"
170  "[Rr]emote.[Pp]oisson[Rr]econstruction"
171  "[Rr]emote.[Pp]owercrust"
172 
173  # sometimes we use system third party headers with issues
174  # in this case liblas
175  "include/liblas"
176 
177  # in this case a redefinition of strndup between netcdf and
178  # /usr/include/x86_64-linux-gnu/bits/string2.h but the warning
179  # does not include ThirdParty in the line
180  "bits/string2\\.h"
181 
182  # some windows link warnings related to hdf5 that do not include
183  # ThirdParty in the message
184  "H5.*\\.c\\.obj : warning LNK4221"
185 
186  # ThirdParty xdmf2 uses sbrk which has been marked deprecated but
187  # produces a warning without ThirdParty ala
188  # /usr/include/unistd.h:587:7: note: 'sbrk' has been explicitly marked deprecated here
189  "note: 'sbrk' has been explicitly marked deprecated here"
190 
191  # libproj source code includes the line
192  # return 0; /* suppresses a warning */
193  # which is listed as context for another warning
194  # and causes a match due to the work warning in it
195  "return 0; /\\* suppresses a warning \\*/"
196 
197  # boost graph lib causes a warning on gcc with code that
198  # boost uses internally. An example for you template fans is
199  # /source/Infovis/BoostGraphAlgorithms/Testing/Cxx/TestBoostAdapter.cxx:221:47: warning: '*((void*)(& ei)+32).__gnu_cxx::__normal_iterator<boost::detail::stored_edge_property<long unsigned int, boost::property<boost::edge_index_t, unsigned int> >*, std::vector<boost::detail::stored_edge_property<long unsigned int, boost::property<boost::edge_index_t, unsigned int> >, std::allocator<boost::detail::stored_edge_property<long unsigned int, boost::property<boost::edge_index_t, unsigned int> > > > >::_M_current' may be used uninitialized in this function [-Wmaybe-uninitialized]
200  "[Bb]oost[Gg]raph.*edge_property.*may be used uninitialized"
201 
202  # Boost.Graph uses deprecated Boost headers internally.
203  "define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior"
204 
205  # Boost.Math is C++14; ignore warnings for now.
206  "boost/math/tools/config.hpp.*: warning: .*minimum language standard"
207 
208  # Warnings due to DIY
209  "xmemory.*: warning C4996:.*Default Bounds constructor"
210 
211  # viskores uses deprecated TBB headers
212  "TBB Warning: tbb/task.h is deprecated"
213 
214  # viskores related warnings, someone working on viskores should fix these and once fixed
215  # remove these suppressions
216  "struct VISKORES_DEPRECATED"
217  "viskores::filter"
218 
219  # eigen uses this internal header from CUDA that should not be used.
220  # [-Wcpp]
221  "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead"
222 
223  # warnings from moc generated code such as
224  # GUISupport/Qt/GUISupportQt_autogen/EWIEGA46WW/moc_QVTKInteractorInternal.cpp:73:55: warning: redundant parentheses surrounding declarator [-Wredundant-parens]
225  "autogen.*moc.*redundant parentheses"
226  # GUISupport/Qt/GUISupportQt_autogen/EWIEGA46WW/moc_QFilterTreeProxyModel.cpp:40:5: warning: 'StringRefStorage' may not intend to support class template argument deduction [-Wctad-maybe-unsupported]
227  "autogen.*moc.*ctad-maybe-unsupported"
228 
229  # third party hdf5
230  # if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
231  "H5MM.*quiet GCC warning"
232 
233  # Ignore diy2 warnings
234  "vtkdiy2"
235 
236  # missing overrides may be suppressed, but the superclass shows up as a match on some systems
237  # it makes no sense to suppress the offending class but report the superclass
238  # vtkPolyDataAlgorithm.h:91:3: note: overridden virtual function is here
239  "note: overridden virtual function is here"
240 
241  # Warnings from template instantiations. Remove once cmake/cmake!4766 is releasted.
242  "x(memory0|utility)\\([0-9]+\\): warning C4244"
243 
244  # Timeout errors of SCCACHE are common cases for long builds such as VTK+Viskores+CUDA
245  "sccache: warning: The server looks like it shut down unexpectedly, compiling locally instead"
246 
247  # Ignore warnings from Apple's new linker about duplicate rpath flags.
248  "ld: warning: duplicate -rpath"
249 
250  # Libxml2 has an ignored warning in a line with a string containing `warning`
251  "xmlVFormatLegacyError.*validity warning"
252 
253  # Suppress deprecated CUB Swap function warning suggesting cuda::std::swap
254  "cub::CUB_200802_SM_600::Swap.*deprecated.*cuda::std::swap"
255  )
256 endif ()
257 
258 # CI-specific warning suppressions.
259 #
260 # Some of our CI ends up generating warnings that don't really matter. Of
261 # particular interest are warnings which have different behavior in older
262 # compilers than modern ones. It's not really all that important to cater to
263 # old, broken warning implementations when newer compilers tell us when we
264 # aren't doing things properly.
265 if (NOT "$ENV{CI}" STREQUAL "")
266  # Warning exclusions for old compilers and dependencies.
267  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "mindeps")
268  # GCC 8.0.0
269  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "el7")
270  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
271  # Deprecated classes trigger "usage" warnings in methods marked with
272  # either `= default` or `= delete` generated implementations. This is not
273  # helpful, so just ignore them all.
274  "Wdeprecated-declarations"
275  )
276  endif ()
277  endif ()
278 
279  # For some reason, warning flags aren't working here.
280  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "_ext_vtk")
281  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
282  "Wstringop-overflow="
283  "note: destination object allocated here"
284  "note: destination object '.*' of size .*"
285 
286  "Wstringop-overread"
287  "note: source object '.*' of size .*"
288  "note: at offset .* into source object '.*' of size .*"
289  )
290  endif ()
291  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "wasm")
292  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
293  # Emscripten tends to use bleeding edge versions of clang.
294  # Suppress warnings from clang's c++ headers about deprecated features.
295  "note: '[a-z]?strstream' has been explicitly marked deprecated here"
296  "note: 'char_traits<vtkfmt::detail::char8_type>' has been explicitly marked deprecated here"
297  "warning: 'char_traits<vtkfmt::detail::char8_type>' is deprecated"
298  )
299  endif ()
300 endif ()
301 
302 list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
303  "vtk[^\\.]+(Java|Python).cxx"
304  ".*Testing.Cxx.*cxx"
305  ".*Testing.Cxx.*h"
306  ".*moc_.*cxx"
307 
308  # Exclude files from the Utilities directories
309  ".*/Utilities/.*"
310  ".*/ThirdParty/.*")
version