From d406a77ed7879c124fbaf1d757d002b9f0771620 Mon Sep 17 00:00:00 2001 From: Jonas Thies Date: Fri, 9 Mar 2018 05:03:46 -0800 Subject: [PATCH] ghost: fix finding cblas header and libs (at least for mkl and netlib-lapack, which provide headers()) --- var/spack/repos/builtin/packages/ghost/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/ghost/package.py b/var/spack/repos/builtin/packages/ghost/package.py index 8964ee6404e..18b75fa04ac 100644 --- a/var/spack/repos/builtin/packages/ghost/package.py +++ b/var/spack/repos/builtin/packages/ghost/package.py @@ -64,11 +64,8 @@ class Ghost(CMakePackage): def cmake_args(self): spec = self.spec - cblas_include_dir = '' - if '^mkl' not in spec: - cblas_include_dir = '-DCBLAS_INCLUDE_DIR=' + \ - spec['blas'].prefix.include - + # note: we require the cblas_include_dir property from the blas provider, + # this is implemented at least for intel-mkl and netlib-lapack args = ['-DGHOST_ENABLE_MPI:BOOL=%s' % ('ON' if '+mpi' in spec else 'OFF'), '-DGHOST_USE_CUDA:BOOL=%s' @@ -78,9 +75,12 @@ def cmake_args(self): '-DGHOST_USE_ZOLTAN:BOOL=%s' % ('ON' if '+zoltan' in spec else 'OFF'), '-DBUILD_SHARED_LIBS:BOOL=%s' - % ('ON' if '+shared' in spec else 'OFF'), cblas_include_dir + % ('ON' if '+shared' in spec else 'OFF'), + '-DCBLAS_INCLUDE_DIR:STRING=%s' + % format(spec['blas:c'].headers.directories[0]), + '-DBLAS_LIBRARIES=%s' + % spec['blas:c'].libs.joined(';') ] - return args def check(self):