Commit 5cf2a21d authored by Haocheng LIU's avatar Haocheng LIU Committed by Kitware Robot

Merge topic 'merge-rendering-executables'

2f20549b Merge rendering testing executables to a shared library
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1506
parents deb9a3c4 2f20549b
Merge rendering testing executables to a shared library
This commit allows rendering testing executables to select the device at runtime.
......@@ -28,7 +28,7 @@ set(unit_tests
UnitTestCanvas.cxx
UnitTestMapperConnectivity.cxx
UnitTestMultiMapper.cxx
UnitTestMapperCylinders.cxx
#UnitTestMapperCylinders.cxx
UnitTestMapperPoints.cxx
UnitTestMapperQuads.cxx
UnitTestMapperRayTracer.cxx
......@@ -36,17 +36,7 @@ set(unit_tests
UnitTestMapperVolume.cxx
)
vtkm_unit_tests(NAME Rendering BACKEND SERIAL SOURCES ${unit_tests} LIBRARIES vtkm_rendering)
if (TARGET vtkm::tbb)
vtkm_unit_tests(NAME Rendering BACKEND TBB SOURCES ${unit_tests} LIBRARIES vtkm_rendering)
endif()
if (TARGET vtkm::openmp)
vtkm_unit_tests(NAME Rendering BACKEND OPENMP SOURCES ${unit_tests} LIBRARIES vtkm_rendering)
endif()
if (TARGET vtkm::cuda)
vtkm_unit_tests(NAME Rendering BACKEND CUDA SOURCES ${unit_tests} LIBRARIES vtkm_rendering)
endif()
vtkm_unit_tests(SOURCES ${unit_tests} ALL_BACKENDS LIBRARIES vtkm_rendering)
if(VTKm_ENABLE_GL_CONTEXT)
# message(STATUS "rendering testing/glfw needs a FindGLFW")
......
......@@ -46,8 +46,7 @@ void RenderTests()
} //namespace
int UnitTestCanvas(int, char* [])
int UnitTestCanvas(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -59,8 +59,7 @@ void RenderTests()
} //namespace
int UnitTestMapperConnectivity(int, char* [])
int UnitTestMapperConnectivity(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -77,8 +77,7 @@ void RenderTests()
} //namespace
int UnitTestMapperCylinders(int, char* [])
int UnitTestMapperCylinders(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -62,8 +62,7 @@ void RenderTests()
} //namespace
int UnitTestMapperPoints(int, char* [])
int UnitTestMapperPoints(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -58,8 +58,7 @@ void RenderTests()
} //namespace
int UnitTestMapperQuads(int, char* [])
int UnitTestMapperQuads(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -57,8 +57,7 @@ void RenderTests()
} //namespace
int UnitTestMapperRayTracer(int, char* [])
int UnitTestMapperRayTracer(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -51,8 +51,7 @@ void RenderTests()
} //namespace
int UnitTestMapperVolume(int, char* [])
int UnitTestMapperVolume(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -139,8 +139,7 @@ void RenderTests()
} //namespace
int UnitTestMapperWireframer(int, char* [])
int UnitTestMapperWireframer(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
......@@ -70,8 +70,7 @@ void RenderTests()
} //namespace
int UnitTestMultiMapper(int, char* [])
int UnitTestMultiMapper(int argc, char* argv[])
{
vtkm::cont::GetGlobalRuntimeDeviceTracker().ForceDevice(VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
return vtkm::cont::testing::Testing::Run(RenderTests);
return vtkm::cont::testing::Testing::Run(RenderTests, argc, argv);
}
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