Add clarification for DEVICE_SOURCES

The `vtkm_add_target_information` CMake function has a `DEVICE_SOURCES`
option that allows you to list which sources need to be compiled with a
device compiler. Added some hints to the documentation about which
source code needs to be listed in `DEVICE_SOURCES`.
This commit is contained in:
Kenneth Moreland 2021-10-12 13:48:28 -06:00
parent 8e6a8d8cd4
commit 8ea7fbc350

@ -312,7 +312,15 @@ endfunction()
#
# DEVICE_SOURCES: The collection of source files that are used by `target(s)` that
# need to be marked as going to a special compiler for certain device adapters
# such as CUDA.
# such as CUDA. A source file generally needs to be in DEVICE_SOURCES if (and
# usually only if) it includes vtkm/cont/DeviceAdapterAlgorithm.h (either directly
# or indirectly). The most common code to include DeviceAdapterAlgorithm.h are
# those that use vtkm::cont::Algorithm or those that define worklets. Templated
# code that does computation often links to device adapter algorithms. Some
# device adapters that require a special compiler for device code will check in
# their headers that a device compiler is being used when it is needed. Such
# errors can be corrected by adding the source code to `DEVICE_SOURCES` (or
# removing the dependence on device algorithm when possible).
#
# EXTENDS_VTKM: Some programming models have restrictions on how types can be used,
# passed across library boundaries, and derived from.