The using-with-cmake test contains a simple example CMake script to link with RAJA using:
target_link_libraries(using-with-cmake RAJA)
However the RAJA target does not currently expose necessary compiler flags (--expt-extended-lambda) when CUDA (possibly other) is used. PUBLIC or INTERFACE Cmake visibility would reduce complexity of application CMake scripts.
Care should be used if adding to RAJA directly with PUBLIC may not be desirable as applications may not use all the backends used during the RAJA configure/install.
target_compile_options(raja_cuda_usage INTERFACE
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
)
The using-with-cmake test contains a simple example CMake script to link with RAJA using:
However the RAJA target does not currently expose necessary compiler flags (--expt-extended-lambda) when CUDA (possibly other) is used. PUBLIC or INTERFACE Cmake visibility would reduce complexity of application CMake scripts.
Care should be used if adding to RAJA directly with PUBLIC may not be desirable as applications may not use all the backends used during the RAJA configure/install.