summaryrefslogtreecommitdiff
path: root/caffe2
diff options
context:
space:
mode:
authorBram Wasti <bwasti@fb.com>2017-01-04 15:46:43 -0800
committerBram Wasti <bwasti@fb.com>2017-01-04 15:46:43 -0800
commit249e1857e23842ce359b3a99fc81e18ccdb598f2 (patch)
tree2d436ecd9c9c3dd3c8dd74278866693a6ee169ca /caffe2
parent711b4576818ee3eb44d0a4a3d667d2a7ac2d4ba5 (diff)
downloadpytorch-249e1857e23842ce359b3a99fc81e18ccdb598f2.tar.gz
pytorch-249e1857e23842ce359b3a99fc81e18ccdb598f2.tar.bz2
pytorch-249e1857e23842ce359b3a99fc81e18ccdb598f2.zip
Reset and warn when any options are not satisfied
Diffstat (limited to 'caffe2')
-rw-r--r--caffe2/CMakeLists.txt6
-rw-r--r--caffe2/contrib/nccl/CMakeLists.txt2
-rw-r--r--caffe2/cuda_rtc/CMakeLists.txt2
3 files changed, 5 insertions, 5 deletions
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
index e8754447ad..e039e23cc8 100644
--- a/caffe2/CMakeLists.txt
+++ b/caffe2/CMakeLists.txt
@@ -61,7 +61,7 @@ install(TARGETS Caffe2_CPU DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
list(APPEND Caffe2_MAIN_LIBS Caffe2_CPU)
# ---[ CUDA library.
-if(HAVE_CUDA)
+if(USE_CUDA)
CUDA_ADD_LIBRARY(Caffe2_GPU ${Caffe2_GPU_SRCS})
target_link_libraries(Caffe2_GPU ${Caffe2_MAIN_LIBS} ${Caffe2_DEPENDENCY_LIBS})
install(TARGETS Caffe2_GPU DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
@@ -86,7 +86,7 @@ set_target_properties(caffe2_pybind11_state PROPERTIES PREFIX "")
target_link_libraries(caffe2_pybind11_state ${Caffe2_MAIN_LIBS} ${Caffe2_DEPENDENCY_LIBS})
install(TARGETS caffe2_pybind11_state DESTINATION ${CMAKE_INSTALL_PREFIX}/caffe2/python)
-if(HAVE_CUDA)
+if(USE_CUDA)
add_library(caffe2_pybind11_state_gpu SHARED ${Caffe2_GPU_PYTHON_SRCS})
set_target_properties(caffe2_pybind11_state_gpu PROPERTIES PREFIX "")
target_link_libraries(caffe2_pybind11_state_gpu ${Caffe2_MAIN_LIBS} ${Caffe2_DEPENDENCY_LIBS})
@@ -101,7 +101,7 @@ foreach(binary_src ${Caffe2_CPU_BINARY_SRCS})
install(TARGETS ${bin_name} DESTINATION ${CMAKE_INSTALL_PREFIX}/binaries)
endforeach()
-if(HAVE_CUDA)
+if(USE_CUDA)
foreach(binary_src ${Caffe2_GPU_BINARY_SRCS})
get_filename_component(bin_name ${binary_src} NAME_WE)
add_executable(${bin_name} ${binary_src})
diff --git a/caffe2/contrib/nccl/CMakeLists.txt b/caffe2/contrib/nccl/CMakeLists.txt
index 0631cd12cd..97b3de6885 100644
--- a/caffe2/contrib/nccl/CMakeLists.txt
+++ b/caffe2/contrib/nccl/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(HAVE_CUDA)
+if(USE_CUDA)
message(STATUS "Include NCCL operators")
set(Caffe2_CONTRIB_NCCL_GPU_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/cuda_nccl_gpu.cc"
diff --git a/caffe2/cuda_rtc/CMakeLists.txt b/caffe2/cuda_rtc/CMakeLists.txt
index 133d737b0c..41acd4d72d 100644
--- a/caffe2/cuda_rtc/CMakeLists.txt
+++ b/caffe2/cuda_rtc/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(HAVE_CUDA)
+if(USE_CUDA)
set(Caffe2_CUDA_RTC_GPU_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/elemenntwise_rtc_gpu.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/pool_op_rtc_gpu.cc"