set( CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000 )
set( CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000 )

##------------------------------------------------------------------------------
## Ignore warnings in generated code during the build process
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
  # For *NIX builds, MOAB does not generate export headers. Instead, it builds
  # its libraries with default (i.e. public) visibility. SMTK builds with hidden
  # visibility, so on MacOS we get warnings that match the following pattern
  # where SMTK directly access symbols from the MOAB library. As of 03/19/2019,
  # there is no plan to add symbol exporting to MOAB. Thus, we ignore these
  # warnings.
  #
  # There is also an instance from a protected class in smtkQtExt.
  "warning: direct access in function .* to global weak symbol 'typeinfo "

  # Ignore warnings from CMake autogen code
  "autogen"

  # ParaView generated code (paraview/paraview!4957)
  "AutoStartImplementation.*modernize-use-nullptr"
  "pqSMTKAutoStart.*Implementation.*modernize-use-nullptr"
)

##------------------------------------------------------------------------------
## Regular expression for error exceptions during build process
#set (CTEST_CUSTOM_ERROR_EXCEPTION
#  ${CTEST_CUSTOM_ERROR_EXCEPTION}
#)

cmake_policy(SET CMP0012 NEW)

if(@SMTK_COVERAGE_ENABLED@)
  set(COVERAGE_EXTRA_FLAGS "-l -p")
  set(CTEST_CUSTOM_COVERAGE_EXCLUDE
    "thirdparty"
    "testing"
    "pybind11"
    "qt"
    "autogen"
    "CMakeFiles"
    )
endif()
