summaryrefslogtreecommitdiff
path: root/cmake/ConfigGen.cmake
diff options
context:
space:
mode:
authorTea <tea.desouza@gmail.com>2015-06-27 11:44:56 +0800
committerTea <tea.desouza@gmail.com>2015-09-17 15:08:29 +0800
commitf3a933a620b8b089a7fe29ba76ec27f5408ff68d (patch)
tree6c33b48d78564bdc0721dc31d1ccb915be888571 /cmake/ConfigGen.cmake
parent71e05876f644a08af4cb1c955d01c5a272539e96 (diff)
downloadcaffeonacl-f3a933a620b8b089a7fe29ba76ec27f5408ff68d.tar.gz
caffeonacl-f3a933a620b8b089a7fe29ba76ec27f5408ff68d.tar.bz2
caffeonacl-f3a933a620b8b089a7fe29ba76ec27f5408ff68d.zip
Separate IO dependencies
OpenCV, LMDB, LevelDB and Snappy are made optional via switches (USE_OPENCV, USE_LMDB, USE_LEVELDB) available for Make and CMake builds. Since Snappy is a LevelDB dependency, its use is determined by USE_LEVELDB. HDF5 is left bundled because it is used for serializing weights and solverstates.
Diffstat (limited to 'cmake/ConfigGen.cmake')
-rw-r--r--cmake/ConfigGen.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/ConfigGen.cmake b/cmake/ConfigGen.cmake
index 566d6ca0..8b259965 100644
--- a/cmake/ConfigGen.cmake
+++ b/cmake/ConfigGen.cmake
@@ -56,6 +56,18 @@ function(caffe_generate_export_configs)
list(APPEND Caffe_DEFINITIONS -DCPU_ONLY)
endif()
+ if(USE_OPENCV)
+ list(APPEND Caffe_DEFINITIONS -DUSE_OPENCV)
+ endif()
+
+ if(USE_LMDB)
+ list(APPEND Caffe_DEFINITIONS -DUSE_LMDB)
+ endif()
+
+ if(USE_LEVELDB)
+ list(APPEND Caffe_DEFINITIONS -DUSE_LEVELDB)
+ endif()
+
if(NOT HAVE_CUDNN)
set(HAVE_CUDNN FALSE)
else()