This is the beginning of a CUDAUtilities module, with one function:
cmake_cuda_arch_detect. The changes are as follows:
CUDA/. The other three files in FindCUDA are distinctly FindCUDA only files (they aren't even
includeable), whereas this one is general.
CUDA_SELECT_NVCC_ARCH_FLAGSwith keyword parsing and renamed to
READABLEoutput is now requestable, and an adapter to the old name and syntax is provided when FindCUDA uses the function. The new function also provides a
FLAGSis used to get the flag list.
TARGETS, along with
PRIVATEkeywords, to set an interface or compile target flags, property protected with
COMPILE_LANGUAGE. (This will only work with the CUDA as a language mode)
- Uses the
--genenerate-codesyntax rather than
-gencode, avoiding needing the new
CUDA_SELECT_NVCC_ARCH_FLAGSconverts back to the old syntax for maximum backward compatibility. Caching improved a bit to ensure 1 run per configure even if the detection fails.
- User-facing access to the new function is provided in a new
CUDAUtilitiesmodule, mimicking the name of the
CSharpUtilitiessmodule already in CMake. A future pull request with a new function (convert CXX to CUDA flags) in CUDAUtilities is planned.
- A test has been added,
Followup to !1856 (merged) .