summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/HEADER_DIRS_NAME.rst
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-12-24 19:29:37 (GMT)
committerRaul Tambre <raul@tambre.ee>2022-01-27 20:11:13 (GMT)
commitdaf372c4d686000fd2c6f380efa7f5ddfd915ceb (patch)
tree246028ce0713a469d7bf6c5bd0832d022296e0f6 /Help/prop_tgt/HEADER_DIRS_NAME.rst
parent7a0d0983521cbd16030add2afbb0f7d9e75cce6f (diff)
downloadCMake-daf372c4d686000fd2c6f380efa7f5ddfd915ceb.zip
CMake-daf372c4d686000fd2c6f380efa7f5ddfd915ceb.tar.gz
CMake-daf372c4d686000fd2c6f380efa7f5ddfd915ceb.tar.bz2
CUDA: Fix issuing error if default architecture detection fails
We require CUDA_ARCHITECTURES to be set for targets (see CMP0104). If not set anything after compiler detection such as ABI detection will fail to generate. This means we need to error if CMAKE_CUDA_ARCHITECTURES is not set to a valid value as a result of compiler detection. Currently we fail to issue the error if compiler detection failed and the ID is unset. In such a case we won't define detected_architecture making the code responsible for the error unreachable. Simplify the detection of architectures used during compiler detection by always detecting all of them, which enables us to simply the check in the "default to compiler" path if CMAKE_CUDA_ARCHITECTURES is empty. As a result we need to move the error checking and CMAKE_CUDA_ARCHITECTURES=OFF handling fully into the default path thus simplifying the code and unifying the code paths for NVCC and CUDA. This also happens to fix: 1. CMAKE_CUDA_ARCHITECTURES=OFF on Clang. 2. A theoretical issue of a compiler defaulting to multiple architectures. I've additionally added printing of the compiler output along the error to better reveal possible underlying compiler/system configuration issues. Fixes #23010.
Diffstat (limited to 'Help/prop_tgt/HEADER_DIRS_NAME.rst')
0 files changed, 0 insertions, 0 deletions