CMakeLists.txt 1.82 KB
Newer Older
1 2 3 4 5 6 7 8
##============================================================================
##  Copyright (c) Kitware, Inc.
##  All rights reserved.
##  See LICENSE.txt for details.
##  This software is distributed WITHOUT ANY WARRANTY; without even
##  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##  PURPOSE.  See the above copyright notice for more information.
##
9
##  Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
10 11 12
##  Copyright 2014 UT-Battelle, LLC.
##  Copyright 2014 Los Alamos National Security.
##
13
##  Under the terms of Contract DE-NA0003525 with NTESS,
14 15 16 17 18 19 20 21 22
##  the U.S. Government retains certain rights in this software.
##
##  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
##  Laboratory (LANL), the U.S. Government retains certain rights in
##  this software.
##============================================================================

set(headers
  TestingOpenGLInterop.h
23
  TestingTransferFancyHandles.h
24 25
  )

26 27 28 29 30 31 32 33 34 35 36
set(unit_tests)

# So because we are using GLEW to do our
# GL binding we can only expect one
# of these transfer tests to work
#
#
set(needs_rendering FALSE)
if(VTKm_OSMesa_FOUND AND TARGET vtkm_rendering)
  list(APPEND unit_tests
    UnitTestTransferOSMesa.cxx
37
    UnitTestFancyTransferOSMesa.cxx
38 39 40 41 42
  )
  set(needs_rendering TRUE)
elseif(VTKm_EGL_FOUND AND TARGET vtkm_rendering)
  list(APPEND unit_tests
    UnitTestTransferEGL.cxx
43
    UnitTestFancyTransferEGL.cxx
44
  )
45 46 47 48 49 50
  set(needs_rendering TRUE)
else()
  vtkm_configure_component_GLUT()
  if(VTKm_GLUT_FOUND)
    list(APPEND unit_tests
       UnitTestTransferGLUT.cxx
51
       UnitTestFancyTransferGLUT.cxx
52 53 54
    )
  endif()
endif()
55

56

57 58 59
vtkm_declare_headers(${headers})
vtkm_unit_tests(SOURCES ${unit_tests})
if(needs_rendering)
60
  target_link_libraries(UnitTests_vtkm_interop_testing PRIVATE vtkm_rendering)
61
endif()