UnitTests with an explicitly backend pass it as a compile def

Previously the backend was not past as a compile definition which
would cause serial worklet tests to use the TBB backend if
it was enabled.
This commit is contained in:
Robert Maynard 2018-05-11 14:16:26 -04:00
parent eb75456d17
commit 4a75023115

@ -414,9 +414,8 @@ function(vtkm_unit_tests)
set_property(TARGET ${test_prog} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${VTKm_EXECUTABLE_OUTPUT_PATH})
target_link_libraries(${test_prog} PRIVATE vtkm_cont ${VTKm_UT_LIBRARIES})
if(VTKm_UT_NO_TESTS)
return()
if(backend)
target_compile_definitions(${test_prog} PRIVATE "VTKM_DEVICE_ADAPTER=VTKM_DEVICE_ADAPTER_${backend}")
endif()
#determine the timeout for all the tests based on the backend. CUDA tests