Commit ab3d89d4 authored by Robert Maynard's avatar Robert Maynard

Simplify the example/demo CMakeLists.txt

parent 028e954b
......@@ -28,16 +28,12 @@ find_package(VTKm REQUIRED QUIET)
set(srcs Demo.cxx)
if(TARGET vtkm_rendering)
set(backend "VTKM_DEVICE_ADAPTER_SERIAL")
if(TARGET vtkm::cuda)
vtkm_compile_as_cuda(cuda_srcs ${srcs})
set(srcs ${cuda_srcs})
set(backend "VTKM_DEVICE_ADAPTER_CUDA")
elseif(TARGET vtkm::tbb)
set(backend "VTKM_DEVICE_ADAPTER_TBB")
endif()
add_executable(Demo ${srcs})
target_link_libraries(Demo PRIVATE vtkm_rendering)
target_compile_definitions(Demo PRIVATE "VTKM_DEVICE_ADAPTER=${backend}")
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment