cp2k: fix build issues without cuda, and with elpa on openSUSE (#27738)

This commit is contained in:
Tiziano Müller 2021-12-02 00:00:01 +01:00 committed by GitHub
parent 326acea29d
commit 08b00f8804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -486,11 +486,11 @@ def edit(self, spec, prefix):
# Currently AOCC support only static libraries of ELPA
if '%aocc' in spec:
libs.append(join_path(elpa.prefix.lib,
libs.append(join_path(elpa.libs.directories[0],
('libelpa{elpa_suffix}.a'
.format(elpa_suffix=elpa_suffix))))
else:
libs.append(join_path(elpa.prefix.lib,
libs.append(join_path(elpa.libs.directories[0],
('libelpa{elpa_suffix}.{dso_suffix}'
.format(elpa_suffix=elpa_suffix,
dso_suffix=dso_suffix))))
@ -661,7 +661,7 @@ def build_targets(self):
]
def build(self, spec, prefix):
if len(spec.variants['cuda_arch'].value) > 1:
if '+cuda' in spec and len(spec.variants['cuda_arch'].value) > 1:
raise InstallError("cp2k supports only one cuda_arch at a time")
# Apparently the Makefile bases its paths on PWD