summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPramod S Kumbhar <pramod.r.s.kumbhar@gmail.com>2017-09-11 01:14:22 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-09-10 13:14:22 -1000
commitb14b02f875a4844e37139bb091c960d680931b05 (patch)
tree1d50ec20231e1447ca170cb1e1131e2cc1e3bc4c
parente0fa335df0bde84a1e688ce139ff44ad29877aca (diff)
downloadspack-b14b02f875a4844e37139bb091c960d680931b05.tar.gz
spack-b14b02f875a4844e37139bb091c960d680931b05.tar.bz2
spack-b14b02f875a4844e37139bb091c960d680931b05.tar.xz
spack-b14b02f875a4844e37139bb091c960d680931b05.zip
Improve caffe dependency detection with extra CMake flags (#5328)
* Improve caffe dependency detection with extra CMake flags * lmdb and leveldb fix
-rw-r--r--var/spack/repos/builtin/packages/caffe/package.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py
index a47e0a04ab..88c0f95832 100644
--- a/var/spack/repos/builtin/packages/caffe/package.py
+++ b/var/spack/repos/builtin/packages/caffe/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -82,7 +82,19 @@ class Caffe(CMakePackage):
'-DBUILD_matlab=%s' % ('+matlab' in spec),
'-DUSE_OPENCV=%s' % ('+opencv' in spec),
'-DUSE_LEVELDB=%s' % ('+leveldb' in spec),
- '-DUSE_LMDB=%s' % ('+lmdb' in spec)]
+ '-DUSE_LMDB=%s' % ('+lmdb' in spec),
+ '-DGFLAGS_ROOT_DIR=%s' % spec['gflags'].prefix,
+ '-DGLOG_ROOT_DIR=%s' % spec['glog'].prefix,
+ ]
+
+ if spec.satisfies('^openblas'):
+ env['OpenBLAS_HOME'] = spec['openblas'].prefix
+
+ if spec.satisfies('+lmdb'):
+ env['LMDB_DIR'] = spec['lmdb'].prefix
+
+ if spec.satisfies('+leveldb'):
+ env['LEVELDB_ROOT'] = spec['leveldb'].prefix
if spec.satisfies('+python'):
version = spec['python'].version.up_to(1)