Skip to content

Commit

Permalink
Fix cmake < v3.7 compatibility in Cuda.cmake (BVLC#6338)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vrichter authored and Noiredd committed Apr 9, 2018
1 parent 723e552 commit c46fc00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/Cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
set(__nvcc_flags "")
set(__nvcc_archs_readable "")

string(COMPARE GREATER_EQUAL "${CUDA_VERSION}" "9.0" iscudanewerthan90)
if(iscudanewerthan90)
string(COMPARE LESS "${CUDA_VERSION}" "9.0" iscudaolderthan90)
if(NOT iscudaolderthan90)
string(REPLACE "21(20)" "" __cuda_arch_bin "${__cuda_arch_bin}")
string(REPLACE "20" "" __cuda_arch_bin "${__cuda_arch_bin}")
endif()
Expand Down

0 comments on commit c46fc00

Please sign in to comment.