Set full xiar path when building cp2k with intel compiler (#14268)

This commit is contained in:
Glenn Johnson 2019-12-22 16:19:12 -06:00 committed by Adam J. Stewart
parent b83365c945
commit 3690bc44bd

View File

@ -437,6 +437,7 @@ def edit(self, spec, prefix):
mkf.write('CC = {0.compiler.cc}\n'.format(self)) mkf.write('CC = {0.compiler.cc}\n'.format(self))
if '%intel' in self.spec: if '%intel' in self.spec:
intel_bin_dir = ancestor(self.compiler.cc)
# CPP is a commented command in Intel arch of CP2K # CPP is a commented command in Intel arch of CP2K
# This is the hack through which cp2k developers avoid doing : # This is the hack through which cp2k developers avoid doing :
# #
@ -444,7 +445,7 @@ def edit(self, spec, prefix):
# #
# and use `-fpp` instead # and use `-fpp` instead
mkf.write('CPP = # {0.compiler.cc} -P\n\n'.format(self)) mkf.write('CPP = # {0.compiler.cc} -P\n\n'.format(self))
mkf.write('AR = xiar -r\n\n') mkf.write('AR = {0}/xiar -r\n\n'.format(intel_bin_dir))
else: else:
mkf.write('CPP = # {0.compiler.cc} -E\n\n'.format(self)) mkf.write('CPP = # {0.compiler.cc} -E\n\n'.format(self))
mkf.write('AR = ar -r\n\n') mkf.write('AR = ar -r\n\n')