Commit 004bfe7b authored by Robert Maynard's avatar Robert Maynard

Prefer using existence of targets when looking for TBB/CUDA support

parent b10e5086
......@@ -126,13 +126,13 @@ add_subdirectory(serial)
list(APPEND sources $<TARGET_OBJECTS:vtkm_cont_serial>)
add_subdirectory(tbb)
if (VTKm_ENABLE_TBB)
if(TARGET vtkm::tbb)
list(APPEND sources $<TARGET_OBJECTS:vtkm_cont_tbb>)
list(APPEND backends vtkm::tbb)
endif()
add_subdirectory(cuda)
if (VTKm_ENABLE_CUDA)
if(TARGET vtkm::cuda)
list(APPEND sources $<TARGET_OBJECTS:vtkm_cont_cuda>)
list(APPEND backends vtkm::cuda)
endif()
......
......@@ -29,7 +29,7 @@ add_subdirectory(internal)
vtkm_declare_headers(CUDA ${headers} TESTABLE ${VTKm_ENABLE_CUDA})
#-----------------------------------------------------------------------------
if (VTKm_ENABLE_CUDA)
if (TARGET vtkm::cuda)
add_subdirectory(testing)
endif()
......@@ -27,6 +27,6 @@ add_subdirectory(internal)
vtkm_declare_headers(${headers} TESTABLE ${VTKm_ENABLE_TBB})
#-----------------------------------------------------------------------------
if (VTKm_ENABLE_TBB)
if (TARGET vtkm::tbb)
add_subdirectory(testing)
endif()
......@@ -33,6 +33,6 @@ set_source_files_properties(ThrustPatches.h
PROPERTIES VTKm_CANT_BE_HEADER_TESTED TRUE)
#-----------------------------------------------------------------------------
if (VTKm_ENABLE_CUDA)
if (TARGET vtkm::cuda)
add_subdirectory(testing)
endif()
......@@ -25,6 +25,6 @@ set(headers
vtkm_declare_headers(${headers})
#-----------------------------------------------------------------------------
if (VTKm_ENABLE_TBB)
if (TARGET vtkm::tbb)
add_subdirectory(testing)
endif()
......@@ -33,6 +33,6 @@ endif()
#-----------------------------------------------------------------------------
add_subdirectory(internal)
if(VTKm_CUDA_FOUND)
if(TARGET vtkm::cuda)
add_subdirectory(cuda)
endif()
......@@ -70,9 +70,9 @@ set(unit_tests
vtkm_unit_tests(NAME Worklets BACKEND SERIAL SOURCES ${unit_tests})
if (VTKm_ENABLE_TBB)
if (TARGET vtkm::tbb)
vtkm_unit_tests(NAME Worklets BACKEND TBB SOURCES ${unit_tests})
endif()
if (VTKm_ENABLE_CUDA)
if (TARGET vtkm::cuda)
vtkm_unit_tests(NAME Worklets BACKEND CUDA SOURCES ${unit_tests})
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