[plasma] add support for building with 'cray-libsci' (#33869)
This commit is contained in:
parent
3ea9c8529a
commit
3812edd0db
@ -85,6 +85,14 @@ class Plasma(CMakePackage):
|
||||
patch("protect_cmake_version.patch", when="@19.8.0:19.8.9")
|
||||
patch("fix_cmake_include.patch", when="@19.8.0:19.8.9")
|
||||
|
||||
@when("@22.9.29")
|
||||
def patch(self):
|
||||
filter_file(
|
||||
"^(#define PLASMA_CORE_LAPACK_H)$",
|
||||
'\\1\n\n#include "plasma_config.h"',
|
||||
"include/core_lapack.h",
|
||||
)
|
||||
|
||||
@when("@develop:")
|
||||
def patch(self):
|
||||
python("tools/generate_precisions.py")
|
||||
@ -107,6 +115,17 @@ def cmake_args(self):
|
||||
if package in self.spec:
|
||||
for lib in ("CBLAS", "LAPACKE"):
|
||||
options.append(self.define("{}_PROVIDER".format(lib), provider))
|
||||
if "cray-libsci" in self.spec:
|
||||
for lib in ("CBLAS", "LAPACKE"):
|
||||
libsci_prefix = self.spec["cray-libsci"].package.external_prefix
|
||||
options.append(self.define("{}_PROVIDER".format(lib), "generic"))
|
||||
options.append(
|
||||
self.define("{}_INCLUDE_DIRS".format(lib), join_path(libsci_prefix, "include"))
|
||||
)
|
||||
options.append(
|
||||
self.define("{}_LIBRARIES".format(lib), self.spec["blas"].libs.joined(";"))
|
||||
)
|
||||
options.append(self.define("CBLAS_ADD_TYPEDEF", True))
|
||||
|
||||
return options
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user