diff options
author | Tiziano Müller <tiziano.mueller@hpe.com> | 2022-05-19 11:38:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 11:38:00 +0200 |
commit | f5250da611ec2639d9e99d0f1a335cfe996090a3 (patch) | |
tree | 5ccc42584989a14f9599cae6e49f33860d76b419 /var | |
parent | c2af154cd24ab3ef501a7efc020f818ef60aa552 (diff) | |
download | spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.gz spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.bz2 spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.xz spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.zip |
cp2k: fix unbound var use without cuda (#30736)
fixes #30631
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cp2k/package.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 523d9055e0..24765bfe67 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -661,7 +661,8 @@ class Cp2k(MakefilePackage, CudaPackage): mkf.write(fflags('CPPFLAGS', cppflags)) mkf.write(fflags('CFLAGS', cflags)) mkf.write(fflags('CXXFLAGS', cxxflags)) - mkf.write(fflags(acc_flags_var, nvflags)) + if '+cuda' in spec: + mkf.write(fflags(acc_flags_var, nvflags)) mkf.write(fflags('FCFLAGS', fcflags)) mkf.write(fflags('LDFLAGS', ldflags)) mkf.write(fflags('LIBS', libs)) |