Commit 06aa1cd0 authored by Robert Maynard's avatar Robert Maynard

VTK-m Accelerator tests now build with correct CUDA arch flags.

Since the tests for VTK modules are isolated from the module,
they don't inherit any local variables including overrides
to CMAKE_CUDA_FLAGS. To remedy this, we explicitly add the
correct CUDA arch flags which are used to build VTK-m and
the Accelerator module.
parent 68f35cda
......@@ -31,6 +31,16 @@ if (TARGET vtkm::cuda)
foreach(src IN LISTS tests)
set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA")
endforeach()
#the tests aren't scoped as a child directory of vtkAcceleratorsVTKm
#so we need to redo this logic
get_property(arch_flags
TARGET vtkm::cuda
PROPERTY INTERFACE_CUDA_Architecture_Flags)
if(NOT arch_flags)
message(FATAL_ERROR "VTK-m CUDA Architecture flags can't be found. This means we can't safely compile CUDA code")
endif()
string(APPEND CMAKE_CUDA_FLAGS " ${arch_flags}")
endif()
......
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