Yeah, I thought about this method yesterday, but I'm not really excited
about this approach. It adds yet another variable for the configuration
that doesn't really match the others. Granted the behavior of the other
FindCUDA options allow setting it before the first FindCUDA invocation, so
there
Maybe we could make the FindCUDA script check if the caller defined that
variable prior to any inclusion. If the user did, then FindCUDA should
respect the caller choice.
Something like that would make the trick:
if(NOT DEFINED CUDA_USE_STATIC_CUDA_RUNTIME_FORCED)
if(DEFINED CUDA_USE_STATIC_CUDA
Whether you can use the static runtime is based on the toolkit found, so if
you change the toolkit (checked with the CUDA_TOOLKIT_ROOT_DIR_INTERNAL
variable) we need to reset all dependent values.
I don't see a clean way to get this to work in the way you want. The
script can't tell the differenc
Hello.
I am using cmake 3.3.2.
The following script sets the CUDA_USE_STATIC_CUDA_RUNTIME option, then
finds the CUDA package.
cmake_minimum_required(VERSION 3.3)
option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
set(CUDA_TOOLKIT_ROOT_DIR "d:/work/CUDAToolkit")
message(STATUS CUDA_USE_STATIC_CUDA_RUNTIM