Skip to content

Commit

Permalink
clang,flang: update CC, CXX environment in installation module (spack…
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop authored and alalazo committed Dec 22, 2017
1 parent d178677 commit 937f68c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/flang/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ def post_install(self):
out.close()
chmod = which('chmod')
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'))
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/llvm/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ class Llvm(CMakePackage):
def setup_environment(self, spack_env, run_env):
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):
spec = self.spec

Expand Down

0 comments on commit 937f68c

Please sign in to comment.