Skip to content

Commit 47f20ae

Browse files
vrichtervera121
authored andcommitted
Fix cmake < v3.7 compatibility in Cuda.cmake (#6338)
Fix for compatibility with CMake <3.7 (related conversation under 37e4289) * Fix cmake < v3.7 compatibility in Cuda.cmake * Fix version test variable naming in Cuda.cmake
1 parent a569f6b commit 47f20ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/Cuda.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
113113
set(__nvcc_flags "")
114114
set(__nvcc_archs_readable "")
115115

116-
string(COMPARE GREATER_EQUAL "${CUDA_VERSION}" "9.0" iscudanewerthan90)
117-
if(iscudanewerthan90)
116+
string(COMPARE LESS "${CUDA_VERSION}" "9.0" iscudaolderthan90)
117+
if(NOT iscudaolderthan90)
118118
string(REPLACE "21(20)" "" __cuda_arch_bin "${__cuda_arch_bin}")
119119
string(REPLACE "20" "" __cuda_arch_bin "${__cuda_arch_bin}")
120120
endif()

0 commit comments

Comments
 (0)