From 27cbf46dd6f93f13e00cd7aea12fc4402fe05ed0 Mon Sep 17 00:00:00 2001 From: luker Date: Thu, 6 Jan 2022 12:44:28 -0600 Subject: lapackpp: set BLA_VENDOR for cray (#28125) --- var/spack/repos/builtin/packages/lapackpp/package.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/lapackpp/package.py b/var/spack/repos/builtin/packages/lapackpp/package.py index 72f7722479..22fe23cb66 100644 --- a/var/spack/repos/builtin/packages/lapackpp/package.py +++ b/var/spack/repos/builtin/packages/lapackpp/package.py @@ -45,12 +45,18 @@ class Lapackpp(CMakePackage): def cmake_args(self): spec = self.spec - return [ + + args = [ '-DBUILD_SHARED_LIBS=%s' % ('+shared' in spec), '-Dbuild_tests=%s' % self.run_tests, '-DLAPACK_LIBRARIES=%s' % spec['lapack'].libs.joined(';') ] + if spec['blas'].name == 'cray-libsci': + args.append(self.define('BLA_VENDOR', 'CRAY')) + + return args + def check(self): # If the tester fails to build, ensure that the check() fails. if os.path.isfile(join_path(self.build_directory, 'test', 'tester')): @@ -58,3 +64,8 @@ class Lapackpp(CMakePackage): make('check') else: raise Exception('The tester was not built!') + + def flag_handler(self, name, flags): + if (self.spec['blas'].name == 'cray-libsci') and name == 'cxxflags': + flags.append('-DLAPACK_FORTRAN_ADD_') + return (None, None, flags) -- cgit v1.2.3-70-g09d2