cp2k: fix unbound var use without cuda (#30736)

fixes #30631
This commit is contained in:
Tiziano Müller 2022-05-19 11:38:00 +02:00 committed by GitHub
parent c2af154cd2
commit f5250da611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -661,7 +661,8 @@ def fflags(var, lst):
mkf.write(fflags('CPPFLAGS', cppflags)) mkf.write(fflags('CPPFLAGS', cppflags))
mkf.write(fflags('CFLAGS', cflags)) mkf.write(fflags('CFLAGS', cflags))
mkf.write(fflags('CXXFLAGS', cxxflags)) 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('FCFLAGS', fcflags))
mkf.write(fflags('LDFLAGS', ldflags)) mkf.write(fflags('LDFLAGS', ldflags))
mkf.write(fflags('LIBS', libs)) mkf.write(fflags('LIBS', libs))