clang,flang: update CC, CXX environment in installation module (#6737)
This commit is contained in:
parent
d1786779c4
commit
937f68c359
2 changed files with 9 additions and 0 deletions
|
@ -80,3 +80,8 @@ def post_install(self):
|
||||||
out.close()
|
out.close()
|
||||||
chmod = which('chmod')
|
chmod = which('chmod')
|
||||||
chmod('+x', flang)
|
chmod('+x', flang)
|
||||||
|
|
||||||
|
def setup_environment(self, spack_env, run_env):
|
||||||
|
run_env.set('FC', join_path(self.spec.prefix.bin, 'flang'))
|
||||||
|
run_env.set('F77', join_path(self.spec.prefix.bin, 'flang'))
|
||||||
|
run_env.set('F90', join_path(self.spec.prefix.bin, 'flang'))
|
||||||
|
|
|
@ -365,6 +365,10 @@ class Llvm(CMakePackage):
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
|
spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
|
||||||
|
|
||||||
|
if '+clang' in self.spec:
|
||||||
|
run_env.set('CC', join_path(self.spec.prefix.bin, 'clang'))
|
||||||
|
run_env.set('CXX', join_path(self.spec.prefix.bin, 'clang++'))
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue