Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2016-05-28 05:40:40 +0300
committerSoumith Chintala <soumith@gmail.com>2016-05-28 05:40:40 +0300
commitc605f3c4dc82f43c5d57b2acab219ede962a7512 (patch)
treebe8ccf9e472e0a94dbd1faa02718aa32e9715da6
parent1342a08459e2863a947223538ed268af50626dba (diff)
Revert "Poring to new CMake"
-rw-r--r--CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc39fbc..266241c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,18 +1,14 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.8)
+SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
+
FIND_PACKAGE(Torch REQUIRED)
FIND_PACKAGE(CUDA 6.5 REQUIRED)
# Detect CUDA architecture and get best NVCC flags
-IF(DEFINED CUDA_HAS_FP16)
- # New CMake macro, comes with FindCUDA
- CUDA_SELECT_NVCC_ARCH_FLAGS(NVCC_FLAGS_EXTRA $ENV{TORCH_CUDA_ARCH_LIST})
-ELSE()
- # Old way of getting the flags, with extra include file
- INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindCudaArch.cmake)
- SELECT_NVCC_ARCH_FLAGS(NVCC_FLAGS_EXTRA)
-ENDIF()
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindCudaArch.cmake)
+SELECT_NVCC_ARCH_FLAGS(NVCC_FLAGS_EXTRA)
LIST(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})
INCLUDE_DIRECTORIES("${Torch_INSTALL_INCLUDE}/THC")