Merge branch 'use_usage_requirements' into 'master'

Use usage requirements

See merge request !673
This commit is contained in:
Robert Maynard 2017-01-27 17:36:16 -05:00
commit 407f9822c2
20 changed files with 137 additions and 85 deletions

@ -21,7 +21,7 @@
# Once done this will define
#
# EGL_FOUND - true if EGL has been found
# EGL_INCLUDE_DIR - where the EGL/egl.h and KHR/khrplatform.h can be found
# EGL_INCLUDE_DIRS - where the EGL/egl.h and KHR/khrplatform.h can be found
# EGL_LIBRARY - link this to use libEGL.so.1
# EGL_opengl_LIBRARY - link with these two libraries instead of the gl library
# EGL_gldispatch_LIBRARY for full OpenGL support through EGL
@ -102,10 +102,15 @@ if(NOT EGL_gldispatch_LIBRARY)
endif()
endif()
set(EGL_LIBRARIES ${EGL_LIBRARY} ${EGL_opengl_LIBRARY} ${EGL_gldispatch_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EGL DEFAULT_MSG
EGL_LIBRARY EGL_opengl_LIBRARY EGL_gldispatch_LIBRARY EGL_INCLUDE_DIR)
find_package_handle_standard_args(EGL
FOUND_VAR EGL_FOUND
REQUIRED_VARS EGL_LIBRARY EGL_opengl_LIBRARY EGL_gldispatch_LIBRARY EGL_INCLUDE_DIR)
if(EGL_FOUND)
set(EGL_LIBRARIES ${EGL_LIBRARY} ${EGL_opengl_LIBRARY} ${EGL_gldispatch_LIBRARY})
set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
endif()
mark_as_advanced(EGL_DIR EGL_INCLUDE_DIR EGL_LIBRARY EGL_opengl_LIBRARY EGL_gldispatch_LIBRARY)

@ -64,15 +64,17 @@
#
# * Kitware, Inc.
find_path(GLEW_INCLUDE_DIR GL/glew.h)
find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
set(GLEW_LIBRARIES ${GLEW_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLEW
FOUND_VAR GLEW_FOUND
REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
if(GLEW_FOUND)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
set(GLEW_LIBRARIES ${GLEW_LIBRARY})
endif()
mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY)

@ -23,8 +23,8 @@
# Once done this will define
#
# GLFW_FOUND
# GLFW_INCLUDE_DIR
# GLFW_LIBRARY
# GLFW_INCLUDE_DIRS
# GLFW_LIBRARIES
#
include(FindPackageHandleStandardArgs)
@ -94,9 +94,14 @@ if (${CMAKE_HOST_UNIX})
DOC "The GLFW library")
endif ()
find_package_handle_standard_args(GLFW DEFAULT_MSG
GLFW_INCLUDE_DIR
GLFW_LIBRARY
find_package_handle_standard_args(GLFW
FOUND_VAR GLFW_FOUND
REQUIRED_VARS GLFW_INCLUDE_DIR GLFW_LIBRARY
)
if(GLFW_FOUND)
set(GLFW_LIBRARIES ${GLFW_LIBRARY})
set(GLFW_INCLUDE_DIRS ${GLFW_INCLUDE_DIR})
endif()
mark_as_advanced( GLFW_INCLUDE_DIR GLFW_LIBRARY )

@ -69,9 +69,13 @@ endif()
# Check for required components
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Thrust
FOUND_VAR Thrust_FOUND
REQUIRED_VARS THRUST_INCLUDE_DIR
VERSION_VAR THRUST_VERSION
)
set(THRUST_INCLUDE_DIRS ${THRUST_INCLUDE_DIR})
if(Thrust_FOUND)
set(THRUST_INCLUDE_DIRS ${THRUST_INCLUDE_DIR})
endif()
mark_as_advanced(THRUST_INCLUDE_DIR)

@ -71,7 +71,7 @@ macro(vtkm_finish_configure_component component)
if(NOT VTKm_${component}_FOUND)
cmake_parse_arguments(VTKm_FCC
""
"IS_BACKEND"
""
"DEPENDENT_VARIABLES;ADD_INCLUDES;ADD_LIBRARIES"
${ARGN}
@ -89,6 +89,10 @@ macro(vtkm_finish_configure_component component)
if (VTKm_${component}_FOUND)
set(VTKm_INCLUDE_DIRS ${VTKm_INCLUDE_DIRS} ${VTKm_FCC_ADD_INCLUDES})
set(VTKm_LIBRARIES ${VTKm_LIBRARIES} ${VTKm_FCC_ADD_LIBRARIES})
if(${VTKm_FCC_IS_BACKEND})
set(VTKm_BACKEND_INCLUDE_DIRS ${VTKm_BACKEND_INCLUDE_DIRS} ${VTKm_FCC_ADD_INCLUDES})
set(VTKm_BACKEND_LIBRARIES ${VTKm_BACKEND_LIBRARIES} ${VTKm_FCC_ADD_LIBRARIES})
endif()
endif()
endif()
endmacro()
@ -118,6 +122,7 @@ macro(vtkm_configure_component_Serial)
vtkm_configure_component_Base()
vtkm_finish_configure_component(Serial
IS_BACKEND
DEPENDENT_VARIABLES VTKm_Base_FOUND
)
endmacro(vtkm_configure_component_Serial)
@ -151,8 +156,10 @@ macro(vtkm_configure_component_OpenGL)
find_package(GLEW ${VTKm_FIND_PACKAGE_QUIETLY})
list(APPEND vtkm_opengl_dependent_vars GLEW_FOUND)
list(APPEND vtkm_opengl_includes ${GLEW_INCLUDE_DIRS})
list(APPEND vtkm_opengl_libraries ${GLEW_LIBRARIES})
if(GLEW_FOUND)
list(APPEND vtkm_opengl_includes ${GLEW_INCLUDE_DIRS})
list(APPEND vtkm_opengl_libraries ${GLEW_LIBRARIES})
endif()
#on unix/linux Glew uses pthreads, so we need to find that, and link to it
#explicitly or else in release mode we get sigsegv on launch
if(UNIX)
@ -166,6 +173,10 @@ macro(vtkm_configure_component_OpenGL)
ADD_INCLUDES ${vtkm_opengl_includes}
ADD_LIBRARIES ${vtkm_opengl_libraries}
)
set(VTKm_OPENGL_INCLUDE_DIRS ${vtkm_opengl_includes})
set(VTKm_OPENGL_LIBRARIES ${vtkm_opengl_libraries})
endmacro(vtkm_configure_component_OpenGL)
macro(vtkm_configure_component_OSMesa)
@ -189,8 +200,8 @@ macro(vtkm_configure_component_EGL)
vtkm_finish_configure_component(EGL
DEPENDENT_VARIABLES VTKm_OpenGL_FOUND EGL_FOUND
ADD_INCLUDES ${EGL_INCLUDE_DIR}
ADD_LIBRARIES ${EGL_LIBRARY}
ADD_INCLUDES ${EGL_INCLUDE_DIRS}
ADD_LIBRARIES ${EGL_LIBRARIES}
)
endmacro(vtkm_configure_component_EGL)
@ -201,8 +212,8 @@ macro(vtkm_configure_component_GLFW)
vtkm_finish_configure_component(GLFW
DEPENDENT_VARIABLES VTKm_OpenGL_FOUND GLFW_FOUND
ADD_INCLUDES ${GLFW_INCLUDE_DIR}
ADD_LIBRARIES ${GLFW_LIBRARY}
ADD_INCLUDES ${GLFW_INCLUDE_DIRS}
ADD_LIBRARIES ${GLFW_LIBRARIES}
)
endmacro(vtkm_configure_component_GLFW)
@ -247,6 +258,7 @@ macro(vtkm_configure_component_TBB)
endif()
vtkm_finish_configure_component(TBB
IS_BACKEND
DEPENDENT_VARIABLES VTKm_ENABLE_TBB VTKm_Base_FOUND TBB_FOUND
ADD_INCLUDES ${TBB_INCLUDE_DIRS}
ADD_LIBRARIES ${TBB_LIBRARIES}
@ -258,6 +270,10 @@ macro(vtkm_configure_component_CUDA)
vtkm_configure_component_Base()
find_package(CUDA ${VTKm_FIND_PACKAGE_QUIETLY})
#Make cuda link privately to cuda libraries
set(CUDA_LIBRARIES PRIVATE ${CUDA_LIBRARIES})
mark_as_advanced(
CUDA_BUILD_CUBIN
CUDA_BUILD_EMULATION
@ -272,6 +288,7 @@ macro(vtkm_configure_component_CUDA)
endif()
vtkm_finish_configure_component(CUDA
IS_BACKEND
DEPENDENT_VARIABLES
VTKm_ENABLE_CUDA
VTKm_Base_FOUND

@ -109,16 +109,21 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
# and we want system includes so we have to hijack cuda
# to do it
foreach(dir ${VTKm_INCLUDE_DIRS})
#this internal variable has changed names depending on the CMake ver
list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -isystem ${dir})
list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER -isystem ${dir})
endforeach()
cuda_include_directories(${VTKm_SOURCE_DIR}
${VTKm_BINARY_DIR}/include
)
cuda_add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
target_include_directories(TestBuild_${name} PRIVATE ${VTKm_INCLUDE_DIRS})
elseif (${cxxfiles_len} GREATER 0)
add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
target_include_directories(TestBuild_${name} PRIVATE ${VTKm_INCLUDE_DIRS})
target_include_directories(TestBuild_${name} PRIVATE vtkm ${VTKm_INCLUDE_DIRS})
endif ()
target_link_libraries(TestBuild_${name} ${VTKm_LIBRARIES})
target_link_libraries(TestBuild_${name} PRIVATE vtkm_cont ${VTKm_LIBRARIES})
set_source_files_properties(${hfiles}
PROPERTIES HEADER_FILE_ONLY TRUE
)
@ -263,7 +268,10 @@ function(vtkm_unit_tests)
vtkm_setup_nvcc_flags( old_nvcc_flags old_cxx_flags )
# Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_include_directories(${VTKm_SOURCE_DIR}
${VTKm_BINARY_DIR}/include
${VTKm_INCLUDE_DIRS}
)
cuda_add_executable(${test_prog} ${TestSources})
@ -278,7 +286,7 @@ function(vtkm_unit_tests)
#for any other targets
target_include_directories(${test_prog} PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(${test_prog} ${VTKm_LIBRARIES})
target_link_libraries(${test_prog} PRIVATE vtkm_cont ${VTKm_LIBRARIES})
target_compile_options(${test_prog} PRIVATE ${VTKm_COMPILE_OPTIONS})
@ -395,7 +403,10 @@ function(vtkm_worklet_unit_tests device_adapter)
vtkm_setup_nvcc_flags( old_nvcc_flags old_cxx_flags )
# Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_include_directories(${VTKm_SOURCE_DIR}
${VTKm_BINARY_DIR}/include
${VTKm_INCLUDE_DIRS}
)
cuda_add_executable(${test_prog} ${unit_test_drivers} ${unit_test_srcs})
@ -405,7 +416,7 @@ function(vtkm_worklet_unit_tests device_adapter)
add_executable(${test_prog} ${unit_test_drivers} ${unit_test_srcs})
endif()
target_include_directories(${test_prog} PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(${test_prog} ${VTKm_LIBRARIES})
target_link_libraries(${test_prog} PRIVATE vtkm_cont ${VTKm_LIBRARIES})
#add the specific compile options for this executable
target_compile_options(${test_prog} PRIVATE ${VTKm_COMPILE_OPTIONS})
@ -522,7 +533,11 @@ function(vtkm_benchmarks device_adapter)
if(is_cuda)
# Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_include_directories(${VTKm_SOURCE_DIR}
${VTKm_BINARY_DIR}/include
${VTKm_BACKEND_INCLUDE_DIRS}
)
cuda_add_executable(${benchmark_prog} ${file} ${benchmark_headers})
else()
@ -532,8 +547,8 @@ function(vtkm_benchmarks device_adapter)
set_source_files_properties(${benchmark_headers}
PROPERTIES HEADER_FILE_ONLY TRUE)
target_include_directories(${benchmark_prog} PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(${benchmark_prog} ${VTKm_LIBRARIES})
target_include_directories(${benchmark_prog} PRIVATE ${VTKm_BACKEND_INCLUDE_DIRS})
target_link_libraries(${benchmark_prog} PRIVATE vtkm_cont ${VTKm_BACKEND_LIBRARIES})
if(MSVC)
vtkm_setup_msvc_properties(${benchmark_prog})
@ -610,7 +625,10 @@ function(vtkm_library)
vtkm_wrap_sources_for_cuda(cuda_sources ${VTKm_LIB_WRAP_FOR_CUDA})
# Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_include_directories(${VTKm_SOURCE_DIR}
${VTKm_BINARY_DIR}/include
${VTKm_BACKEND_INCLUDE_DIRS}
)
if(BUILD_SHARED_LIBS AND NOT WIN32)
set(compile_options -Xcompiler=${CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY}hidden)
@ -625,18 +643,8 @@ function(vtkm_library)
add_library(${lib_name} ${VTKm_LIB_SOURCES})
endif()
#do it as a property value so we don't pollute the include_directories
#for any other targets
set_property(TARGET ${lib_name} APPEND PROPERTY
INCLUDE_DIRECTORIES ${VTKm_INCLUDE_DIRS} )
set(lib_subset)
foreach(lib ${VTKm_LIBRARIES})
if(NOT lib STREQUAL lib_name)
list(APPEND lib_subset ${lib})
endif()
endforeach()
target_link_libraries(${lib_name} ${lib_subset})
#need to link to the vtkm target as makes C++11 become enabled
target_link_libraries(${lib_name} PUBLIC vtkm)
set(cxx_args ${VTKm_COMPILE_OPTIONS})
separate_arguments(cxx_args)

@ -50,11 +50,6 @@ determine_version(${VTKm_SOURCE_DIR} ${GIT_EXECUTABLE} "VTKm")
# include some vtkm-specific cmake code.
include(VTKmMacros)
set(VTKm_INCLUDE_DIRS
${CMAKE_CURRENT_BINARY_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}
)
# Create an "interface" target library. This is not a real library but rather
# holds CMake configuration that is required for CXX targets that use VTK-m
# headers. In particular, it makes sure the appropriate C++11 version is being
@ -64,6 +59,11 @@ set(VTKm_INCLUDE_DIRS
# configuration.
add_library(vtkm INTERFACE)
target_compile_features(vtkm INTERFACE cxx_auto_type)
target_include_directories(vtkm INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
install(TARGETS vtkm EXPORT ${VTKm_EXPORT_NAME})
# Load the base VTK-m configuration, which is required for some of the later

@ -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()

@ -42,5 +42,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()

@ -89,6 +89,7 @@ set(sources
)
vtkm_library(SOURCES ${sources})
target_include_directories(vtkm_cont PRIVATE ${VTKm_BACKEND_INCLUDE_DIRS})
#-----------------------------------------------------------------------------
add_subdirectory(internal)

@ -53,5 +53,5 @@ endif()
vtkm_declare_headers(${headers})
vtkm_unit_tests(SOURCES ${unit_tests})
if(needs_rendering)
target_link_libraries(UnitTests_vtkm_interop_testing vtkm_rendering)
target_link_libraries(UnitTests_vtkm_interop_testing PRIVATE vtkm_rendering)
endif()

@ -156,6 +156,16 @@ else()
)
endif()
target_link_libraries(vtkm_rendering
PUBLIC vtkm_cont
PRIVATE ${VTKm_OPENGL_LIBRARIES}
${VTKm_BACKEND_LIBRARIES}
)
target_include_directories(vtkm_rendering
PRIVATE ${VTKm_OPENGL_INCLUDE_DIRS}
${VTKm_BACKEND_INCLUDE_DIRS}
)
# Subclasses need rendering library
vtkm_configure_component_Rendering()