Update the examples to work with the new usage requirements

This commit is contained in:
Robert Maynard 2017-01-26 15:20:26 -05:00
parent 8035b526a8
commit e415f55b6f
10 changed files with 34 additions and 34 deletions

@ -26,7 +26,7 @@ find_package(VTKm REQUIRED QUIET
add_executable(Clipping_SERIAL Clipping.cxx)
target_include_directories(Clipping_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(Clipping_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(Clipping_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(Clipping_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
target_compile_definitions(Clipping_SERIAL PRIVATE
"VTKM_DEVICE_ADAPTER=VTKM_DEVICE_ADAPTER_SERIAL")
@ -45,7 +45,7 @@ if(VTKm_CUDA_FOUND)
cuda_add_executable(Clipping_CUDA ${cudaSource})
target_include_directories(Clipping_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(Clipping_CUDA ${VTKm_LIBRARIES})
target_link_libraries(Clipping_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(Clipping_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
@ -56,7 +56,7 @@ endif()
if(VTKm_TBB_FOUND)
add_executable(Clipping_TBB Clipping.cxx)
target_include_directories(Clipping_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(Clipping_TBB ${VTKm_LIBRARIES})
target_link_libraries(Clipping_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(Clipping_TBB PRIVATE PRIVATE ${VTKm_COMPILE_OPTIONS})
target_compile_definitions(Clipping_TBB PRIVATE
"VTKM_DEVICE_ADAPTER=VTKM_DEVICE_ADAPTER_TBB")

@ -27,12 +27,12 @@ find_package(VTKm REQUIRED QUIET
add_executable(ContourTreeMesh2D_SERIAL ContourTreeMesh2D.cxx)
target_include_directories(ContourTreeMesh2D_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh2D_SERIAL ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh2D_SERIAL ${GLUT_LIBRARIES} PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh2D_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(ContourTreeMesh3D_SERIAL ContourTreeMesh3D.cxx)
target_include_directories(ContourTreeMesh3D_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh3D_SERIAL ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh3D_SERIAL ${GLUT_LIBRARIES} PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh3D_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND)
@ -48,14 +48,14 @@ if(VTKm_CUDA_FOUND)
configure_file(ContourTreeMesh2D.cxx ${cudaSource} COPYONLY)
cuda_add_executable(ContourTreeMesh2D_CUDA ${cudaSource})
target_include_directories(ContourTreeMesh2D_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh2D_CUDA ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh2D_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh2D_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
set (cudaSource "${CMAKE_CURRENT_BINARY_DIR}/ContourTreeMesh3D.cu")
configure_file(ContourTreeMesh3D.cxx ${cudaSource} COPYONLY)
cuda_add_executable(ContourTreeMesh3D_CUDA ${cudaSource})
target_include_directories(ContourTreeMesh3D_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh3D_CUDA ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh3D_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh3D_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
@ -65,11 +65,11 @@ endif()
if(VTKm_TBB_FOUND)
add_executable(ContourTreeMesh2D_TBB ContourTreeMesh2D.cxx)
target_include_directories(ContourTreeMesh2D_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh2D_TBB ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh2D_TBB ${GLUT_LIBRARIES} PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh2D_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(ContourTreeMesh3D_TBB ContourTreeMesh3D.cxx)
target_include_directories(ContourTreeMesh3D_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${VTKm_INCLUDE_DIRS})
target_link_libraries(ContourTreeMesh3D_TBB ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
target_link_libraries(ContourTreeMesh3D_TBB ${GLUT_LIBRARIES} PRIVATE ${VTKm_LIBRARIES})
target_compile_options(ContourTreeMesh3D_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()

@ -38,7 +38,7 @@ if(VTKm_OSMesa_FOUND AND VTKm_Rendering_FOUND)
#need to setup the default device adapter.
target_include_directories(Demo PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(Demo ${VTKm_LIBRARIES})
target_link_libraries(Demo PRIVATE ${VTKm_LIBRARIES})
target_compile_options(Demo PRIVATE ${VTKm_COMPILE_OPTIONS})
#when we are using TBB pass in the default device adapter as

@ -23,5 +23,5 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(DynamicDispatcherExample main.cxx)
target_include_directories(DynamicDispatcherExample PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(DynamicDispatcherExample ${VTKm_LIBRARIES})
target_link_libraries(DynamicDispatcherExample PRIVATE ${VTKm_LIBRARIES})
target_compile_options(DynamicDispatcherExample PRIVATE ${VTKm_COMPILE_OPTIONS})

@ -30,7 +30,7 @@ if(VTKm_Interop_FOUND AND VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
add_executable(HelloWorld_SERIAL HelloWorld.cxx LoadShaders.h)
set_source_files_properties(LoadShaders.h PROPERTIES HEADER_FILE_ONLY TRUE)
target_include_directories(HelloWorld_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(HelloWorld_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(HelloWorld_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(HelloWorld_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND)
@ -39,14 +39,14 @@ if(VTKm_Interop_FOUND AND VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
vtkm_disable_troublesome_thrust_warnings()
cuda_add_executable(HelloWorld_CUDA HelloWorld.cu LoadShaders.h)
target_include_directories(HelloWorld_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(HelloWorld_CUDA ${VTKm_LIBRARIES})
target_link_libraries(HelloWorld_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(HelloWorld_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()
if(VTKm_TBB_FOUND)
add_executable(HelloWorld_TBB HelloWorldTBB.cxx LoadShaders.h)
target_include_directories(HelloWorld_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(HelloWorld_TBB ${VTKm_LIBRARIES})
target_link_libraries(HelloWorld_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(HelloWorld_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()

@ -29,7 +29,7 @@ if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
add_executable(IsosurfaceUniformGrid_SERIAL IsosurfaceUniformGrid.cxx quaternion.h)
set_source_files_properties(quaternion.h PROPERTIES HEADER_FILE_ONLY TRUE)
target_include_directories(IsosurfaceUniformGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(IsosurfaceUniformGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(IsosurfaceUniformGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(IsosurfaceUniformGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND)
@ -37,14 +37,14 @@ if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
# Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_add_executable(IsosurfaceUniformGrid_CUDA IsosurfaceUniformGrid.cu quaternion.h)
target_link_libraries(IsosurfaceUniformGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(IsosurfaceUniformGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(IsosurfaceUniformGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()
if(VTKm_ENABLE_TBB)
add_executable(IsosurfaceUniformGrid_TBB IsosurfaceUniformGridTBB.cxx quaternion.h)
target_include_directories(IsosurfaceUniformGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(IsosurfaceUniformGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(IsosurfaceUniformGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(IsosurfaceUniformGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()

@ -34,5 +34,5 @@ else()
endif()
target_include_directories(MultiBackend PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(MultiBackend ${VTKm_LIBRARIES})
target_link_libraries(MultiBackend PRIVATE ${VTKm_LIBRARIES})
target_compile_options(MultiBackend PRIVATE ${VTKm_COMPILE_OPTIONS})

@ -28,6 +28,6 @@ find_package(VTKm REQUIRED QUIET
if(VTKm_OpenGL_FOUND AND VTKm_Rendering_FOUND AND VTKm_GLUT_FOUND)
add_executable(Rendering_SERIAL Rendering.cxx)
target_include_directories(Rendering_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(Rendering_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(Rendering_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(Rendering_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()

@ -28,7 +28,7 @@ find_package(VTKm REQUIRED QUIET
if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
add_executable(StreamLineUniformGrid_SERIAL StreamLineUniformGrid.cxx)
target_include_directories(StreamLineUniformGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(StreamLineUniformGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(StreamLineUniformGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(StreamLineUniformGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND)
@ -36,14 +36,14 @@ if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_add_executable(StreamLineUniformGrid_CUDA StreamLineUniformGrid.cu)
target_include_directories(StreamLineUniformGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(StreamLineUniformGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(StreamLineUniformGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(StreamLineUniformGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()
if(VTKm_TBB_FOUND)
add_executable(StreamLineUniformGrid_TBB StreamLineUniformGridTBB.cxx)
target_include_directories(StreamLineUniformGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(StreamLineUniformGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(StreamLineUniformGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(StreamLineUniformGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()

@ -29,22 +29,22 @@ find_package(VTKm REQUIRED QUIET
if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
add_executable(TetrahedralizeExplicitGrid_SERIAL TetrahedralizeExplicitGrid.cxx)
target_include_directories(TetrahedralizeExplicitGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeExplicitGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeExplicitGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeExplicitGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TriangulateExplicitGrid_SERIAL TriangulateExplicitGrid.cxx)
target_include_directories(TriangulateExplicitGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateExplicitGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(TriangulateExplicitGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateExplicitGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TetrahedralizeUniformGrid_SERIAL TetrahedralizeUniformGrid.cxx)
target_include_directories(TetrahedralizeUniformGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeUniformGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeUniformGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeUniformGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TriangulateUniformGrid_SERIAL TriangulateUniformGrid.cxx)
target_include_directories(TriangulateUniformGrid_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateUniformGrid_SERIAL ${VTKm_LIBRARIES})
target_link_libraries(TriangulateUniformGrid_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateUniformGrid_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND)
@ -53,44 +53,44 @@ if(VTKm_OpenGL_FOUND AND VTKm_GLUT_FOUND)
cuda_add_executable(TetrahedralizeExplicitGrid_CUDA TetrahedralizeExplicitGrid.cu)
target_include_directories(TetrahedralizeExplicitGrid_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeExplicitGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeExplicitGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeExplicitGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
cuda_add_executable(TriangulateExplicitGrid_CUDA TriangulateExplicitGrid.cu)
target_include_directories(TriangulateExplicitGrid_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateExplicitGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(TriangulateExplicitGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateExplicitGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
cuda_add_executable(TetrahedralizeUniformGrid_CUDA TetrahedralizeUniformGrid.cu)
target_include_directories(TetrahedralizeUniformGrid_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeUniformGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeUniformGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeUniformGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
cuda_add_executable(TriangulateUniformGrid_CUDA TriangulateUniformGrid.cu)
target_include_directories(TriangulateUniformGrid_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateUniformGrid_CUDA ${VTKm_LIBRARIES})
target_link_libraries(TriangulateUniformGrid_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateUniformGrid_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()
if(VTKm_ENABLE_TBB)
add_executable(TetrahedralizeExplicitGrid_TBB TetrahedralizeExplicitGridTBB.cxx)
target_include_directories(TetrahedralizeExplicitGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeExplicitGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeExplicitGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeExplicitGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TriangulateExplicitGrid_TBB TriangulateExplicitGridTBB.cxx)
target_include_directories(TriangulateExplicitGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateExplicitGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(TriangulateExplicitGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateExplicitGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TetrahedralizeUniformGrid_TBB TetrahedralizeUniformGridTBB.cxx)
target_include_directories(TetrahedralizeUniformGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TetrahedralizeUniformGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(TetrahedralizeUniformGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TetrahedralizeUniformGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
add_executable(TriangulateUniformGrid_TBB TriangulateUniformGridTBB.cxx)
target_include_directories(TriangulateUniformGrid_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(TriangulateUniformGrid_TBB ${VTKm_LIBRARIES})
target_link_libraries(TriangulateUniformGrid_TBB PRIVATE ${VTKm_LIBRARIES})
target_compile_options(TriangulateUniformGrid_TBB PRIVATE ${VTKm_COMPILE_OPTIONS})
endif()