#
# For further details regarding this file, 
# see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
#

SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS   50)
SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 50)

SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
 ${CTEST_CUSTOM_COVERAGE_EXCLUDE}

 # Exclude kwsys files from coverage results. They are reported
 # (with better coverage results) on kwsys dashboards...
 "/Source/(cm|kw)sys/"

 # Exclude try_compile sources from coverage results:
 "/CMakeFiles/CMakeTmp/"

 # Exclude files generated by Tcl wrapping
 ".*Tcl.cxx"

 # Exclude files generated by the moc pre-compiler
 "moc_.*"

 # Exclude files from the Testing directories
 ".*/Testing/.*"

 # Exclude files that manage GUI 
 ".*GUI.cxx"
 ".*Widgets.cxx"
 "vtkKW.*"
 "vtkSlicerApplication.h"
 "vtkSlicerApplication.cxx"
 "vtkSlicerApplicationSettingsInterface.h"
 "vtkSlicerApplicationSettingsInterface.h"

 # Exclude Qt source files from coverage results:
 "[A-Za-z]./[Qq]t/qt-.+-opensource-src"
 )

SET(CTEST_CUSTOM_WARNING_EXCEPTION
  ${CTEST_CUSTOM_WARNING_EXCEPTION}
  
  # itk suppressions
  "Utilities.gdcm"
  "Utilities.vxl"
  "Insight.Code.Common"

  # vtk suppressions
  "vtkfreetype"
  "Utilities.vtktiff"
  "VTK.*IO.vtkMySQLQuery.cxx"
  "VTK.*Utilities.vtkexodus2"
  "VTK.*Utilities.vtklibproj"
  "VTK.*Utilities.vtksqlite"
  "VTK.*warn_unused_result"
  "VTK.*Filtering.*cxx"
  "VTK.*IO.*cxx"
  "VTK.*Infovis.*cxx"

  # qt suppressions from vtk...
  # Some VTK dashboards include building bits of Qt which produce lots of
  # the following warnings when built with the MS compilers. Qt guys should
  # fix their code. Until they do, keep the Qt chatter off the VTK dashboard
  # results:
  "include.[Qq]t([Cc]ore|[Gg]ui).*warning C4127: conditional expression is constant"
  "[Qq]t.*h.*warning.*declaration of .* shadows a member of .this"
  "[Qq]t.*h.*warning.*(copy constructor|assignment operator) could not be generated"

  # Suppress warning caused when QT 'foreach' loops are combined
  ".*warning: declaration of '_container_' shadows a previous local"

  # Libs/tclap
  "tclap.include.tclap.*Arg.h.*warning C4512.*"

  # Python suppressions
  # About redefinition of symbols
  ".*pyconfig.h.*warning:.*redefined.*"
  "features.h.*"

  # curl suppressions
  "cmcurl.*warning.*conditional expression is constant"

  # Suppressing warnings about duplicate libraries in Darwin
  # At some point this may be addressed by CMake feature request: 
  # http://public.kitware.com/Bug/view.php?id=10179
  "ld: warning: duplicate dylib.*"

  # Libs/OpenIGTLink
  "(OpenIGTLink|openigtlink).[Ss]ource.igtl*"
  
  # Visual studio spurious warnings...
  "The following environment variables were not found"
)
