include(ParaViewTestingMacros)

if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL")
paraview_add_test_cxx(${vtk-module}CxxTests tests
  NO_DATA NO_VALID NO_OUTPUT
  ParaViewCoreClientServerCorePrintSelf.cxx
  TestSpecialDirectories.cxx
  TestSystemCaps.cxx
  )
endif()

if (PARAVIEW_USE_MPI)
  vtk_add_test_mpi(${vtk-module}CxxTests mpi_tests
    NO_DATA NO_VALID NO_OUTPUT
    TestMPI.cxx)
  list(APPEND tests
    ${mpi_tests})

  set_property(SOURCE TestSystemCaps.cxx
    APPEND PROPERTY COMPILE_DEFINITIONS TEST_MPI_CAPS)
else ()
  vtk_add_test_cxx(${vtk-module}CxxTests no_mpi_tests
    NO_DATA NO_VALID NO_OUTPUT
    TestMPI.cxx)
  list(APPEND tests
    ${no_mpi_tests})
endif()

if (PARAVIEW_ENABLE_PYTHON)
  set_property(SOURCE TestSystemCaps.cxx
    APPEND PROPERTY COMPILE_DEFINITIONS TEST_PY_CAPS)
endif()

vtk_test_cxx_executable(${vtk-module}CxxTests tests)

if (PARAVIEW_USE_MPI)
  vtk_mpi_link(${vtk-module}CxxTests)
endif()
