diff options
author | Brad King <brad.king@kitware.com> | 2022-03-22 12:59:20 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-22 12:59:26 (GMT) |
commit | c49480377817184b23c36d8c09d2181c0ecad654 (patch) | |
tree | b09ca0c80f126c0b7a90267a567e610f4147cd49 | |
parent | e6e411f114683f2eb86921e690443ba9d0ef12d8 (diff) | |
parent | 4040173ed398619609b0ad2e8b9a11334f3bc60d (diff) | |
download | CMake-c49480377817184b23c36d8c09d2181c0ecad654.zip CMake-c49480377817184b23c36d8c09d2181c0ecad654.tar.gz CMake-c49480377817184b23c36d8c09d2181c0ecad654.tar.bz2 |
Merge topic 'cuda-nvcc-error-msg-on-detection-failure'
4040173ed3 CUDA: Generate better error message when detecting nvcc
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7094
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index f68c4b2..66020e8 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -260,11 +260,11 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) set(nvcc_test_flags "--keep --keep-dir tmp") if(CMAKE_CUDA_HOST_COMPILER) string(APPEND nvcc_test_flags " -ccbin=\"${CMAKE_CUDA_HOST_COMPILER}\"") - - # If the user has specified a host compiler we should fail instead of trying without. - # Succeeding detection without may result in confusing errors later on, see #21076. - set(CMAKE_CUDA_COMPILER_ID_REQUIRE_SUCCESS ON) endif() + # If we have extracted the vendor as NVIDIA we should require detection to + # work. If we don't, users will get confusing errors later about failure + # to detect a default value for CMAKE_CUDA_ARCHITECTURES + set(CMAKE_CUDA_COMPILER_ID_REQUIRE_SUCCESS ON) elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") set(clang_test_flags "--cuda-path=\"${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}\"") if(CMAKE_CROSSCOMPILING) |