From 05fcda6c7624e710af191460e47958354a91af2e Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Tue, 19 May 2020 15:04:08 -0600 Subject: [PATCH] Compile IO library with device compilers Because the IO classes use ArrayHandle, they have to be compiled with device compilers (even though they do not directly produce any device code). This is a dumb requirement, but it is a requirement nonetheless. --- vtkm/io/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vtkm/io/CMakeLists.txt b/vtkm/io/CMakeLists.txt index 99db550d4..6c9eaeedb 100644 --- a/vtkm/io/CMakeLists.txt +++ b/vtkm/io/CMakeLists.txt @@ -33,9 +33,16 @@ set(template_sources ) set(sources - BOVDataSetReader.cxx DecodePNG.cxx EncodePNG.cxx +) + +# TODO: None of these codes actually use a device. Rather, they access ArrayHandle, and we +# currently need to ensure that ArrayHandle is correctly compiled for all devices. This is +# kind of silly, so hopefully sometime in the future you will no longer need to compile for +# devices for ArrayHandle, and this requirement will go away. +set(device_sources + BOVDataSetReader.cxx VTKDataSetReader.cxx VTKDataSetReaderBase.cxx VTKDataSetWriter.cxx @@ -44,7 +51,7 @@ set(sources VTKStructuredGridReader.cxx VTKStructuredPointsReader.cxx VTKUnstructuredGridReader.cxx -) + ) vtkm_declare_headers( ${headers} @@ -54,6 +61,7 @@ vtkm_declare_headers( vtkm_library( NAME vtkm_io SOURCES ${sources} + DEVICE_SOURCES ${device_sources} HEADERS ${headers} TEMPLATE_SOURCES ${template_sources} )