mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-21 03:25:48 +00:00
Correct a bug which stopped VTK-m from testing against all devices
The testing code wouldn't generate tests except for the first device, when multiple devices had been enabled.
This commit is contained in:
parent
f45e3ae1b8
commit
683f2a2c10
@ -56,7 +56,7 @@ function(vtkm_unit_tests)
|
|||||||
set(test_prog)
|
set(test_prog)
|
||||||
|
|
||||||
|
|
||||||
set(per_device_command_line_arguments "")
|
set(per_device_command_line_arguments "NONE")
|
||||||
set(per_device_suffix "")
|
set(per_device_suffix "")
|
||||||
set(per_device_timeout 180)
|
set(per_device_timeout 180)
|
||||||
set(per_device_serial FALSE)
|
set(per_device_serial FALSE)
|
||||||
@ -65,7 +65,6 @@ function(vtkm_unit_tests)
|
|||||||
if(enable_all_backends)
|
if(enable_all_backends)
|
||||||
set(per_device_command_line_arguments --device=serial)
|
set(per_device_command_line_arguments --device=serial)
|
||||||
set(per_device_suffix "SERIAL")
|
set(per_device_suffix "SERIAL")
|
||||||
|
|
||||||
if (VTKm_ENABLE_CUDA)
|
if (VTKm_ENABLE_CUDA)
|
||||||
list(APPEND per_device_command_line_arguments --device=cuda)
|
list(APPEND per_device_command_line_arguments --device=cuda)
|
||||||
list(APPEND per_device_suffix "CUDA")
|
list(APPEND per_device_suffix "CUDA")
|
||||||
@ -131,8 +130,14 @@ function(vtkm_unit_tests)
|
|||||||
|
|
||||||
target_link_libraries(${test_prog} PRIVATE vtkm_cont ${VTKm_UT_LIBRARIES})
|
target_link_libraries(${test_prog} PRIVATE vtkm_cont ${VTKm_UT_LIBRARIES})
|
||||||
|
|
||||||
foreach(index RANGE per_device_command_line_arguments)
|
list(LENGTH per_device_command_line_arguments number_of_devices)
|
||||||
if(per_device_command_line_arguments STREQUAL "")
|
foreach(index RANGE ${number_of_devices})
|
||||||
|
if(index EQUAL number_of_devices)
|
||||||
|
#RANGE is inclusive on both sides, and we want it to be
|
||||||
|
#exclusive on the end ( e.g. for(i=0; i < n; ++i))
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
if(per_device_command_line_arguments STREQUAL "NONE")
|
||||||
set(device_command_line_argument ${per_device_command_line_arguments})
|
set(device_command_line_argument ${per_device_command_line_arguments})
|
||||||
set(upper_backend ${per_device_suffix})
|
set(upper_backend ${per_device_suffix})
|
||||||
set(timeout ${per_device_timeout})
|
set(timeout ${per_device_timeout})
|
||||||
|
Loading…
Reference in New Issue
Block a user