From b14b02f875a4844e37139bb091c960d680931b05 Mon Sep 17 00:00:00 2001 From: Pramod S Kumbhar Date: Mon, 11 Sep 2017 01:14:22 +0200 Subject: Improve caffe dependency detection with extra CMake flags (#5328) * Improve caffe dependency detection with extra CMake flags * lmdb and leveldb fix --- var/spack/repos/builtin/packages/caffe/package.py | 16 ++++++++++++++-- 1 file 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) -- cgit v1.2.3-70-g09d2