added cuda files back into the build for examples

some of the cuda files were left out during the refactor, brought them back into the build process
This commit is contained in:
Matthew Letter 2017-11-30 15:27:23 -07:00
parent 7f2862a78d
commit 2587584993
2 changed files with 7 additions and 2 deletions

@ -31,11 +31,14 @@ if(TARGET vtkm_rendering)
if(TARGET vtkm::cuda)
set_source_files_properties(Demo.cxx PROPERTIES LANGUAGE "CUDA")
set(backend "VTKM_DEVICE_ADAPTER_CUDA")
add_executable(Demo Demo.cxx)
elseif(TARGET vtkm::tbb)
set(backend "VTKM_DEVICE_ADAPTER_TBB")
cuda_add_executable(Demo Demo.cu)
else()
cuda_add_executable(Demo Demo.cu)
endif()
add_executable(Demo Demo.cxx)
target_link_libraries(Demo PRIVATE vtkm_rendering)
target_compile_definitions(Demo PRIVATE "VTKM_DEVICE_ADAPTER=${backend}")

@ -31,10 +31,12 @@ if(TARGET OpenGL::GL AND
TARGET GLEW::GLEW)
if(TARGET vtkm::cuda)
cuda_add_executable(GameOfLife GameOfLife.cu LoadShaders.h)
set_source_files_properties(GameOfLife.cxx PROPERTIES LANGUAGE "CUDA")
else()
add_executable(GameOfLife GameOfLife.cxx LoadShaders.h)
endif()
add_executable(GameOfLife GameOfLife.cxx LoadShaders.h)
target_link_libraries(GameOfLife PRIVATE vtkm_cont OpenGL::GL GLEW::GLEW GLUT::GLUT)
endif()