rapids_cuda_set_runtime

Added in version v23.08.00.

Establish what CUDA runtime library should be used by a single target

rapids_cuda_set_runtime( target USE_STATIC (TRUE|FALSE) )

Establishes what CUDA runtime will be used for a target, via the CUDA_RUNTIME_LIBRARY and by linking to CUDA::cudart or CUDA::cudart_static if the find_package(CUDAToolkit) has been called.

The linking to the CUDA::cudart or CUDA::cudart_static will have the following usage behavior:

  • For INTERFACE targets the linking will be INTERFACE

  • For all other targets the linking will be PRIVATE

Note

If using the deprecated FindCUDA.cmake you must use the rapids_cuda_init_runtime() method to properly establish the default mode.

When USE_STATIC TRUE is provided the target will link to a

statically-linked CUDA runtime library.

When USE_STATIC FALSE is provided the target will link to a

shared-linked CUDA runtime library.