summaryrefslogtreecommitdiff
path: root/cmake/ConfigGen.cmake
diff options
context:
space:
mode:
authorAnatoly Baksheev <no@email>2015-02-01 17:45:31 +0300
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-02-16 20:48:41 -0800
commitaea5dd674adbccf9927869f5e9ba9e2dfc2cbf21 (patch)
tree119681b184cd92799a2b5aa223e0d64cf8f8e413 /cmake/ConfigGen.cmake
parentc0ae656c0e80e721fec89b63e2cdc390e440d625 (diff)
downloadcaffeonacl-aea5dd674adbccf9927869f5e9ba9e2dfc2cbf21.tar.gz
caffeonacl-aea5dd674adbccf9927869f5e9ba9e2dfc2cbf21.tar.bz2
caffeonacl-aea5dd674adbccf9927869f5e9ba9e2dfc2cbf21.zip
cmake 2.8.7. support
Diffstat (limited to 'cmake/ConfigGen.cmake')
-rw-r--r--cmake/ConfigGen.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/ConfigGen.cmake b/cmake/ConfigGen.cmake
index 24f23e9c..b7cf9f4c 100644
--- a/cmake/ConfigGen.cmake
+++ b/cmake/ConfigGen.cmake
@@ -38,14 +38,21 @@ function(caffe_generate_export_configs)
# ---[ Configure build-tree CaffeConfig.cmake file ]---
caffe_get_current_includes(Caffe_INCLUDE_DIRS)
+
+ set(Caffe_DEFINITIONS "")
if(NOT HAVE_CUDA)
set(HAVE_CUDA FALSE)
- set(Caffe_DEFINITIONS -DCPU_ONLY)
+ list(APPEND Caffe_DEFINITIONS -DCPU_ONLY)
endif()
+
if(NOT HAVE_CUDNN)
set(HAVE_CUDNN FALSE)
else()
- set(Caffe_DEFINITIONS -DUSE_CUDNN)
+ list(APPEND DEFINITIONS -DUSE_CUDNN)
+ endif()
+
+ if(BLAS STREQUAL "MKL" OR BLAS STREQUAL "mkl")
+ list(APPEND Caffe_DEFINITIONS -DUSE_MKL)
endif()
configure_file("cmake/Templates/CaffeConfig.cmake.in" "${CMAKE_BINARY_DIR}/CaffeConfig.cmake" @ONLY)