summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOrion Reblitz-Richardson <orionr@gmail.com>2018-03-22 21:27:17 -0700
committerOrion Reblitz-Richardson <orionr@gmail.com>2018-03-28 10:05:20 -0700
commite881efde799eb1e5ed1b999d9ba9396c320a578f (patch)
tree255bf14fd7d8aa982d28049fc885b1deae76cc8e /cmake
parent3a84574c81f67d4467c8979f363e76f38aa7693c (diff)
downloadpytorch-e881efde799eb1e5ed1b999d9ba9396c320a578f.tar.gz
pytorch-e881efde799eb1e5ed1b999d9ba9396c320a578f.tar.bz2
pytorch-e881efde799eb1e5ed1b999d9ba9396c320a578f.zip
Use local FindCUDA for CMake < 3.7
Diffstat (limited to 'cmake')
-rw-r--r--cmake/MiscCheck.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/MiscCheck.cmake b/cmake/MiscCheck.cmake
index 157def103c..b6d8d54c92 100644
--- a/cmake/MiscCheck.cmake
+++ b/cmake/MiscCheck.cmake
@@ -260,6 +260,8 @@ if (MSVC)
# We know that VS2017 needs the new FindCUDA functionality, so we will
# simply enable it for the whole Windows build.
set(CAFFE2_CMAKE_USE_LOCAL_FINDCUDA ON)
+elseif (${CMAKE_VERSION} VERSION_LESS 3.7 AND ${USE_CUDA})
+ set(CAFFE2_CMAKE_USE_LOCAL_FINDCUDA ON)
endif()
if (${CAFFE2_CMAKE_USE_LOCAL_FINDCUDA})