mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Prefer using existence of targets when looking for TBB/CUDA support
This commit is contained in:
parent
b10e50860f
commit
004bfe7b12
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user