Skip to content

Commit bf809e3

Browse files
committed
ENH: Force superbuild conformance.
1 parent 00aa125 commit bf809e3

22 files changed

+2477
-54
lines changed

CMake/CTestCustom.cmake.in

Lines changed: 347 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,347 @@
1+
#-- #NOTES from http: // www.cmake.org/Wiki/CMake_Testing_With_CTest
2+
#set(CTEST_CUSTOM_MEMCHECK_IGNORE
3+
# $ {CTEST_CUSTOM_MEMCHECK_IGNORE}
4+
# DummyExcludeMemcheckIgnoreTestSetGet
5+
# )
6+
7+
#-- #set(CTEST_CUSTOM_WARNING_MATCH
8+
#-- #${CTEST_CUSTOM_WARNING_MATCH}
9+
#-- #"{standard input}:[0-9][0-9]*: Warning: "
10+
#-- #)
11+
12+
#
13+
# For further details regarding this file,
14+
# see http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
15+
#
16+
# and
17+
# http://www.kitware.com/blog/home/post/27
18+
#
19+
#----------------------------------------------------------------------
20+
21+
#-- #Reset maximum number of warnings so that they all show up.
22+
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)
23+
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000)
24+
25+
# The following tests should not be run under valgrind
26+
set(CTEST_CUSTOM_MEMCHECK_IGNORE
27+
@CTEST_CUSTOM_MEMCHECK_IGNORE@
28+
)
29+
30+
set(CTEST_EXTRA_COVERAGE_GLOB
31+
Source/.*/*.h
32+
Source/.*/*.txx
33+
Source/.*/*.cxx
34+
)
35+
36+
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
37+
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
38+
".*Temporary/.*"
39+
".*boost.*"
40+
# Exclude try_compile sources from coverage results:
41+
"/CMakeFiles/CMakeTmp/"
42+
43+
# Exclude files generated by the moc pre-compiler
44+
".*/moc_.*"
45+
46+
# Exclude files generated by the uic pre-compiler
47+
".*/ui_.*"
48+
49+
# Exclude files generated by the resource pre-compiler
50+
".*/qrc_.*"
51+
52+
# Exclude files from the Testing directories
53+
".*/Testing/.*"
54+
55+
# Exclude generated python files
56+
".*Python.cxx"
57+
".*PythonInit.cxx"
58+
59+
# Exclude Qt Designer plugins
60+
".*/DesignerPlugins/.*"
61+
62+
# Exclude generated cpp files
63+
".*/generated_cpp/.*"
64+
)
65+
66+
67+
set(CTEST_CUSTOM_WARNING_EXCEPTION
68+
${CTEST_CUSTOM_WARNING_EXCEPTION}
69+
#"vtkparse.tab.c"
70+
"Microsoft SDKs."
71+
"VC.include."
72+
73+
# Ignore 'detached HEAD' warnings
74+
"Note.*checking out"
75+
#
76+
"Note: checking out.*"
77+
".*detached.*HEAD.*"
78+
79+
# NIPYPE warnings:
80+
".*NIPYPE-prefix.*warning.*"
81+
82+
# PCRE warnings:
83+
".*PCRE-prefix.*warning.*"
84+
"PCRE.*warning"
85+
"pcre.*has no symbols"
86+
"pcre.*warning"
87+
88+
# Swig warnings:
89+
".*Swig-prefix.*warning"
90+
"Note.*SWIG"
91+
"CParse.*warning"
92+
".*parser.y.*"
93+
"maximum warning verbosity"
94+
"Swig.*note.*"
95+
"warning.*argument unused during compilation"
96+
97+
# Open-CV warnings:
98+
".*OpenCV-build.*warning.*"
99+
".*OpenCV.*"
100+
101+
# FFTW warnings:
102+
".*fftw.*"
103+
104+
# Numpy warnings
105+
"_configtest.*warning"
106+
# C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
107+
# C4028: formal parameter 'number' different from declaration
108+
# C4996: 'function': was declared deprecated
109+
# C4133: '=' : incompatible types - from 'PyArray_Descr *' to 'PyObject *'
110+
# C4146: unary minus operator applied to unsigned type, result still unsigned
111+
# C4716: function '...' : must return a value
112+
# C4723: Potential divide by zero
113+
"numpy.(core|numarray|linalg|random).*warning (C4244|C4028|C4996|C4133|C4146|C4716|C4723)"
114+
# warning: assignment from incompatible pointer type
115+
# warning: ‘...’ defined but not used
116+
# warning: ‘...’ may be used uninitialized in this function
117+
"numpy.(core).*warning.*(assignment|defined but not used|uninitialized)"
118+
"NUMPY.*Warning"
119+
# Mac
120+
"numpy.core.src.multiarray.descriptor.*was declared here"
121+
122+
# Tcl
123+
"tcl.tcl.unix.*warning: cast"
124+
# warning: '...' is deprecated (declared at ...)
125+
"tcl.tcl.unix.*warning:.*is deprecated"
126+
"tcl.tcl.unix.*warning:.*ignoring return value of"
127+
128+
# Tk
129+
"tcl.tk.unix.*warning: cast"
130+
"System.Library.Frameworks.Tk.framework.Headers.X11.Xlib.h.*warning: function declaration isn't a prototype"
131+
"tcl.tk.unix.*warning:.*ignoring return value of"
132+
133+
# incrTcl
134+
"generic.itk_(option|archetype).*warning"
135+
"generic.itcl_.*warning"
136+
137+
# qt suppressions from vtk...
138+
# Some Slicer dashboards include building bits of Qt which produce lots of
139+
# the following warnings when built with the MS compilers. Qt guys should
140+
# fix their code. Until they do, keep the Qt chatter off the Slicer dashboard
141+
# results:
142+
"include.[Qq]t([Cc]ore|[Gg]ui).*warning C4127: conditional expression is constant"
143+
"[Qq]t.*h.*warning.*declaration of .* shadows a member of .this"
144+
"[Qq]t.*h.*warning.*(copy constructor|assignment operator) could not be generated"
145+
# Tiger / 4.6.2 warning
146+
"include.[Qq]t[Cc]ore.qtextcodec.h.*warning.*is already a friend of"
147+
"include.QtGui.(qtextformat|qtablewidget).*warning"
148+
# Snowleopard / 4.6.2 warning
149+
"QtGui.framework.Headers.(qtextformat|qtablewidget).*warning"
150+
151+
# Suppress warning caused when QT 'foreach' loops are combined
152+
".*warning: declaration of '_container_' shadows a previous local"
153+
154+
# STL - Tiger
155+
"include.c.*bits.stl_algo.h.*warning: comparison between signed and unsigned integer expressions"
156+
157+
# Make
158+
"warning: jobserver unavailable"
159+
160+
# Suppressing warnings about GL_GLEXT_LEGACY, the link reported below
161+
# report a similar problem with GL_GLEXT_PROTOTYPE.
162+
# http://lists.apple.com/archives/mac-opengl/2009/Dec/msg00081.html
163+
# That problem could be solved installing a newer version of X11 SDK
164+
# See http://xquartz.macosforge.org/trac/changeset/343
165+
".*warning.*GL_GLEXT_LEGACY.*redefined"
166+
167+
# ITK suppressions
168+
"[Uu]tilities.gdcm"
169+
"[Uu]tilities.vxl"
170+
"[Uu]tilities.itktiff"
171+
"([Ii]nsight|ITKv3).[Cc]ode.[Cc]ommon"
172+
"([Ii]nsight|ITKv3).[Cc]ode.[Nn]umerics"
173+
"([Ii]nsight|ITKv3).[Cc]ode.(IO|io)"
174+
"([Ii]nsight|ITKv3).[Cc]ode.[Ss]patial[Oo]bject"
175+
"([Ii]nsight|ITKv3).[Uu]tilities.[Nn]rrd(IO|io)"
176+
"([Ii]nsight|ITKv3).[Uu]tilities.(openjpeg|nifti)"
177+
"([Ii]nsight|ITKv3|BRAINSFit).*Informational: catch(...) semantics changed since Visual C\\+\\+ 7.1; structured exceptions (SEH) are no longer caught"
178+
179+
# VTK suppressions
180+
"vtkfreetype"
181+
"Utilities.vtktiff"
182+
"VTK.*IO.vtkMySQLQuery.cxx"
183+
"VTK.*Utilities.vtkexodus2"
184+
"VTK.*Utilities.vtklibproj"
185+
"VTK.*Utilities.vtksqlite"
186+
"VTK.*Utilities.VPIC.*cxx"
187+
"VTK.*warn_unused_result"
188+
"VTK.*Filtering.*cxx"
189+
"VTK.*IO.*cxx"
190+
"VTK.*Infovis.*cxx"
191+
"VTK.*vtk.*warning"
192+
# exception specific to Mac/Carbon
193+
"VTK.Rendering.vtkCarbonRenderWindow.*warning.*(NewRgn|DiffRgn|EqualRgn|DisposeRgn).*is deprecated"
194+
# exception specific to Mac/X11
195+
"VTK.Rendering.vtkOpenGL.*warning: this is the location of the previous definition"
196+
197+
# CTK - log4qt
198+
"logobjectptr.obj : warning LNK4221: no public symbols found; archive member will be inaccessible"
199+
"/usr/bin/ranlib: .*libLog4Qt.a.*has no symbols"
200+
"log4qt.rollingfileappender.h.*Warning: Property declaration maxFileSize has no READ accessor function."
201+
"ld.*has different visibility.*libLog4Qt.a"
202+
203+
# CTK - dcmtk
204+
"dcmdata/dcovlay.h:93: warning: use of old-style cast"
205+
"/usr/bin/ranlib: .*lib(dcmtls|oflog).a.*has no symbols"
206+
"ld.*has different visibility.*(libdcmdata|libdcmnet|libdcmimgle|liboflog|libofstd).a"
207+
"DCMTK.(ofstd|dcmdata|dcmjpls|dcmnet|dcmimage|dcmimgle|dcmpstat|dcmqrdb).(lib|include|apps).*conversion from '(size_t|SOCKET)' to '.*', possible loss of data"
208+
209+
# Libs/OpenIGTLink
210+
"(OpenIGTLink|openigtlink).[Ss]ource.igtl"
211+
212+
# Batchmake
213+
"BatchMake.Utilities.Zip.(zip|unzipcmd|zipcmd).*warning"
214+
215+
# Libs/tclap
216+
"tclap.include.tclap.*Arg.h.*warning C4512"
217+
218+
# Teem
219+
# Mac - teem/src/nrrd/superset.c:433: warning: format '%d' expects type 'int', but argument 6 has type 'ptrdiff_t'
220+
"teem.src.nrrd.superset.c.*warning"
221+
222+
# Python - Windows
223+
"Modules.zlib.gzio"
224+
"Modules._ctypes.libffi_msvc.ffi.*warning C4018"
225+
"Modules.audioop.c.*warning C4018"
226+
"Modules._multiprocessing.*warning"
227+
"(Python|Objects|Modules|modules|PC).*conversion from '(Py_uintptr_t|Py_ssize_t|INT_PTR|size_t|__int64)' to '.*', possible loss of data"
228+
# Python - Linux
229+
"dist.py.*UserWarning.*licence.*distribution option is deprecated"
230+
"Objects.unicodeobject.c.*warning:.*differ in signedness"
231+
"[Ii]nclude.(string|unicodeobject).h.*note: expected .const char *. but argument is of type .unsigned char *."
232+
"Modules.(getpath|signalmodule).c.*warning: ignoring return value of.*declared with attribute warn_unused_result"
233+
"Modules.expat.xmlparse.*warning.*discards qualifiers from pointer target type"
234+
# Python - Mac
235+
"ranlib: file:.*libpython2.6.a.*has no symbols"
236+
"python.Modules._cursesmodule.c.*warning.*may be used uninitialized in this function"
237+
"python.Mac.Modules.(cf|Nav).*warning: (cast|unused)"
238+
"python.Modules._ctypes.*warning: function declaration isn't a prototype"
239+
"QuickTime.framework.QuickTime, missing required architecture x86_64 in file"
240+
"python.Modules._ssl.*incompatible pointer type"
241+
"python.Mac.Modules.carbonevt.*defined but not used"
242+
"python.Mac.Modules.qt._Qtmodule.*used uninitialized in this function"
243+
"Modules.main.c.*warning: format not a string literal and no format arguments"
244+
# About redefinition of symbols
245+
"pyconfig.h.*warning:.*redefined"
246+
"features.h.*"
247+
248+
# curl suppressions
249+
"cmcurl.*warning.*conditional expression is constant"
250+
"cmcurl.*warning.*conversion from.*possible loss of data"
251+
# C4701: potentially uninitialized local variable '...' used
252+
# C4057: 'function' : '...' differs in indirection to slightly different base types from '...'
253+
# C4245: '=' : conversion from '...' to '...', signed/unsigned mismatch
254+
# C4706: assignment within conditional expression
255+
# C4232: nonstandard extension used : '...' : address of dllimport '...' is not static, identity not guaranteed
256+
"cmcurl.(transfer|ftp|file|cookie|url|telnet|multi|hostip4|formdata|easy).c.*warning (C4244|C4701|C4057|C4245|C4706|C4232)"
257+
# C4131: uses old-style declarator
258+
# C4244: conversion from '...' to '...', possible loss of data
259+
# C4127: conditional expression is constant
260+
"y.tab.c.*warning (C4131|C4244|C4127|C4701)"
261+
# C4100: unreferenced formal parameter
262+
"getdate.y.*warning(C4100|C4127|C4244)"
263+
# Mac
264+
"curl.mprintf.*warning.*redefined"
265+
"usr.include.secure._stdio.h.*warning: this is the location of the previous definition"
266+
"ranlib: file:.*bin.libslicerlibcurl.a.*has no symbols"
267+
268+
#PythonQt
269+
"PythonQt.src.*conversion from 'size_t' to '.*', possible loss of data"
270+
271+
#Libarchive
272+
"LibArchive.libArchive.*signed/unsigned mismatch"
273+
"LibArchive.libArchive.*conversion from 'size_t' to '.*', possible loss of data"
274+
275+
# Visual studio spurious warnings...
276+
"The following environment variables were not found"
277+
278+
# Since NUMPY has test that return build errors, let's add the following exception
279+
"WARNING non-zero return value in ctest from"
280+
281+
282+
## HACK: THIS SHOULD NOT BE SUPPRESSED, NEED TO FIX OPENCV!!
283+
"BRAINSCutApplyModel.cxx.*warning.*increases required alignment"
284+
285+
"ModuleFactory.*warning.*SymbolPointer"
286+
287+
## HACK: THIS SHOULD NOT BE SUPPRESSED, NEED TO FIX IN ANTs
288+
"ANTs.*warning"
289+
## External Packages
290+
"Note.*SWIG"
291+
".*parser.y.*"
292+
"maximum warning verbosity"
293+
".*OpenCV.*"
294+
".*VTK.*"
295+
".*has no symbols."
296+
"ITKv4"
297+
"SlicerExecutionModel"
298+
"SimpleITK"
299+
300+
".*has no symbols",
301+
"CMake Warning:",
302+
"note: expanded from macro",
303+
": note:",
304+
)
305+
306+
set(CTEST_CUSTOM_WARNING_MATCH
307+
${CTEST_CUSTOM_WARNING_MATCH}
308+
#"CMake Warning[ :]"
309+
)
310+
311+
if(APPLE)
312+
set(CTEST_CUSTOM_WARNING_EXCEPTION
313+
${CTEST_CUSTOM_WARNING_EXCEPTION}
314+
"warning -.: directory name .* does not exist"
315+
316+
# Suppressing warnings about duplicate libraries in Darwin
317+
# At some point this may be addressed by CMake feature request:
318+
# http://public.kitware.com/Bug/view.php?id=10179
319+
"ld.*warning.*duplicate dylib.*"
320+
)
321+
endif()
322+
323+
set(CTEST_CUSTOM_ERROR_MATCH
324+
${CTEST_CUSTOM_ERROR_MATCH}
325+
"CMake Error[ :]"
326+
)
327+
328+
set(CTEST_CUSTOM_ERROR_EXCEPTION
329+
${CTEST_CUSTOM_ERROR_EXCEPTION}
330+
# Numpy errors
331+
"NUMPY.*Warning"
332+
"NUMPY._configtest.*undefined reference"
333+
"_configtest.*error"
334+
"collect2: ld returned 1 exit status"
335+
336+
#SWIG
337+
"Note.*SWIG"
338+
".*parser.y.*"
339+
"maximum warning verbosity"
340+
".*OpenCV.*"
341+
".*VTK.*"
342+
".*has no symbols."
343+
"ITKv4"
344+
"SlicerExecutionModel"
345+
"SimpleITK"
346+
347+
)

0 commit comments

Comments
 (0)