diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-03 10:50:11 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-03 11:22:54 +0300 |
commit | 1fc95d829f92b81737095a146313131633286b8e (patch) | |
tree | 4ba26ca14a8142010044ec555b6966bc48b91feb /intern | |
parent | daa9edc9be7a4837283eb46c8908c7b8eccec0c8 (diff) |
CMake: fix error building when CUDA_NVCC_EXECUTABLE is missing
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index c6ac280633b..e33330af029 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -482,19 +482,19 @@ if(WITH_CYCLES_CUDA_BINARIES) if(DEFINED CUDA10_NVCC_EXECUTABLE) set(cuda_nvcc_executable ${CUDA10_NVCC_EXECUTABLE}) set(cuda_toolkit_root_dir ${CUDA10_TOOLKIT_ROOT_DIR}) - elseif(${CUDA_VERSION} LESS 110) # Support for sm_30 was removed in CUDA 11 + elseif("${CUDA_VERSION}" LESS 110) # Support for sm_30 was removed in CUDA 11 set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE}) set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR}) else() message(STATUS "CUDA binaries for ${arch} require CUDA 10 or earlier, skipped.") endif() - elseif(${arch} MATCHES ".*_7." AND ${CUDA_VERSION} LESS 100) + elseif(${arch} MATCHES ".*_7." AND "${CUDA_VERSION}" LESS 100) message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.") elseif(${arch} MATCHES ".*_8.") if(DEFINED CUDA11_NVCC_EXECUTABLE) set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE}) set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR}) - elseif(${CUDA_VERSION} GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11 + elseif("${CUDA_VERSION}" GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11 set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE}) set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR}) else() |