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 
116  # Ignore some tidy warnings from wrapper code.
117  "vtk[^\\.]+(Java|Python).cxx:.*\\[(readability-redundant-string-init)\\]"
118 
119  # Ignore some doxygen warnings
120  "warning: documented symbol 'template class .*' was not declared or defined."
121  "vtkContext2D.h:.*: warning: argument '.*' of command @param is not found in the argument list of vtkContext2D::DrawMarkers"
122  "vtkMultiThreshold.h:.*: warning: argument '.*' of command @param is not found in the argument list of vtkMultiThreshold::AddIntervalSet"
123 
124  # Ignore bits from gcc-12 stdlib. There seem to be some serious issues in GCC
125  # 12 diagnostics. These come from the `quay.io/pypa/manylinux_2_28_x86_64`
126  # container as of now.
127  "/opt/rh/gcc-toolset-12"
128  )
129 
130 set(cdash_show_third_party_warnings "")
131 if (NOT cdash_show_third_party_warnings)
132  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
133  # issue with exodus but exodus is not included in the note
134  # should these issues get fixed in exodus then remove this
135  # suppression
136  "note: '__builtin___snprintf_chk'"
137 
138  # HDF5 lex/yacc sources compilation lacks the "ThirdParty" part of the path.
139  "hl/src/H5LT(parse|analyze)"
140 
141  # Suppress ThirdParty source code from displaying warnings.
142  "[Tt]hird[Pp]arty"
143 
144  # Suppress MetaIO warnings.
145  "MetaIO/vtkmetaio"
146 
147  # clang will often give multiline warnings from macro expansions,
148  # where the first part has "warning:" and subsequent parts have "note:"
149  # and those will sometimes expand into systems headers. When this occurs
150  # for ThirdParty code, we want it suppressed too. Do so here for headers within Xcode.
151  "Xcode\\.app/Contents/Developer.+note:"
152 
153  # Suppress Remote module source code from displaying warnings.
154  # Suppress modules individually as just "Remote" is a common pattern
155  "[Rr]emote.[Mm]oment[Ii]nvariants"
156  "[Rr]emote.[Pp]oisson[Rr]econstruction"
157  "[Rr]emote.[Pp]owercrust"
158 
159  # sometimes we use system third party headers with issues
160  # in this case liblas
161  "include/liblas"
162 
163  # in this case a redefinition of strndup between netcdf and
164  # /usr/include/x86_64-linux-gnu/bits/string2.h but the warning
165  # does not include ThirdParty in the line
166  "bits/string2\\.h"
167 
168  # some windows link warnings related to hdf5 that do not include
169  # ThirdParty in the message
170  "H5.*\\.c\\.obj : warning LNK4221"
171 
172  # ThirdParty xdmf2 uses sbrk which has been marked deprecated but
173  # produces a warning without ThirdParty ala
174  # /usr/include/unistd.h:587:7: note: 'sbrk' has been explicitly marked deprecated here
175  "note: 'sbrk' has been explicitly marked deprecated here"
176 
177  # libproj source code includes the line
178  # return 0; /* suppresses a warning */
179  # which is listed as context for another warning
180  # and causes a match due to the work warning in it
181  "return 0; /\\* suppresses a warning \\*/"
182 
183  # boost graph lib causes a warning on gcc with code that
184  # boost uses internally. An example for you template fans is
185  # /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]
186  "[Bb]oost[Gg]raph.*edge_property.*may be used uninitialized"
187 
188  # Boost.Graph uses deprecated Boost headers internally.
189  "define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior"
190 
191  # Warnings due to DIY
192  "xmemory.*: warning C4996:.*Default Bounds constructor"
193 
194  # vtkm uses deprecated TBB headers
195  "TBB Warning: tbb/task.h is deprecated"
196 
197  # vtkm related warnings, someone working on vtkm should fix these and once fixed
198  # remove these suppressions
199  "struct VTKM_DEPRECATED"
200  "vtkm::filter"
201 
202  # eigen uses this internal header from CUDA that should not be used.
203  # [-Wcpp]
204  "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"
205 
206  # warnings from moc generated code such as
207  # GUISupport/Qt/GUISupportQt_autogen/EWIEGA46WW/moc_QVTKInteractorInternal.cpp:73:55: warning: redundant parentheses surrounding declarator [-Wredundant-parens]
208  "autogen.*moc.*redundant parentheses"
209 
210  # third party hdf5
211  # if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
212  "H5MM.*quiet GCC warning"
213 
214  # Ignore diy2 warnings
215  "vtkdiy2"
216 
217  # missing overrides may be suppressed, but the superclass shows up as a match on some systems
218  # it makes no sense to suppress the offending class but report the superclass
219  # vtkPolyDataAlgorithm.h:91:3: note: overridden virtual function is here
220  "note: overridden virtual function is here"
221 
222  # Warnings from template instantiations. Remove once cmake/cmake!4766 is releasted.
223  "x(memory0|utility)\\([0-9]+\\): warning C4244"
224 
225  # Timeout errors of SCCACHE are common cases for long builds such as VTK+VTKm+CUDA
226  "sccache: warning: The server looks like it shut down unexpectedly, compiling locally instead"
227  )
228 endif ()
229 
230 # CI-specific warning suppressions.
231 #
232 # Some of our CI ends up generating warnings that don't really matter. Of
233 # particular interest are warnings which have different behavior in older
234 # compilers than modern ones. It's not really all that important to cater to
235 # old, broken warning implementations when newer compilers tell us when we
236 # aren't doing things properly.
237 if (NOT "$ENV{CI}" STREQUAL "")
238  # Warning exclusions for old compilers and dependencies.
239  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "mindeps")
240  # GCC 4.8.5
241  if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "el7")
242  list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
243  # Deprecated classes trigger "usage" warnings in methods marked with
244  # either `= default` or `= delete` generated implementations. This is not
245  # helpful, so just ignore them all.
246  "Wdeprecated-declarations"
247  )
248  endif ()
249  endif ()
250 endif ()
251 
252 list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
253  "vtk[^\\.]+(Java|Python).cxx"
254  ".*Testing.Cxx.*cxx"
255  ".*Testing.Cxx.*h"
256  ".*moc_.*cxx"
257 
258  # Exclude files from the Utilities directories
259  ".*/Utilities/.*"
260  ".*/ThirdParty/.*")
version