# if we have rendering add the following tests
IF (VTK_USE_RENDERING)
  SET(KIT Graphics)
  # add etsts that do not require data
  SET(MyTests)
  IF(VTK_USE_DISPLAY)
    SET(MyTests     
      Mace.cxx
      expCos.cxx
      CellLocator.cxx
      PointLocator.cxx
      FrustumClip.cxx
      RGrid.cxx
      )
  ENDIF(VTK_USE_DISPLAY)
  IF (VTK_DATA_ROOT)
    # add tests that require data
    SET(MyTests ${MyTests}     
      volProt.cxx
      )
  ENDIF (VTK_DATA_ROOT)
  CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx ${MyTests}
                         EXTRA_INCLUDE vtkSuppressCrtDbgWarning.h
                         FUNCTION vtkSuppressCrtDbgWarning)
  ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO)
  SET (TestsToRun ${Tests})
  REMOVE (TestsToRun ${KIT}CxxTests.cxx)

  #
  # Add all the executables 
  FOREACH (test ${TestsToRun})
    GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
    IF (VTK_DATA_ROOT)
      ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
          -D ${VTK_DATA_ROOT}
          -V Baseline/${KIT}/${TName}.png)
    ELSE (VTK_DATA_ROOT)
      ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}) 
    ENDIF (VTK_DATA_ROOT)
  ENDFOREACH (test) 
ENDIF (VTK_USE_RENDERING)
