summaryrefslogtreecommitdiff
path: root/lib/spack/spack/build_environment.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-06-19 10:34:21 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-06-22 12:50:34 -0700
commit3653cfe6f08acc28ef9b65d8a81596119168b316 (patch)
tree5e6324a54ef25a4b0e9407fb6d05e862053074ae /lib/spack/spack/build_environment.py
parentb6740cf1d1fe847ae0064f7d7a5be1b24dcf4779 (diff)
downloadspack-3653cfe6f08acc28ef9b65d8a81596119168b316.tar.gz
spack-3653cfe6f08acc28ef9b65d8a81596119168b316.tar.bz2
spack-3653cfe6f08acc28ef9b65d8a81596119168b316.tar.xz
spack-3653cfe6f08acc28ef9b65d8a81596119168b316.zip
Compiler support now uses configuration files.
- no more need for compiler python files. - Default compilers are found in user's environment and added to ~/.spackconfig automatically - User can add new compilers by editing configuration file
Diffstat (limited to 'lib/spack/spack/build_environment.py')
-rw-r--r--lib/spack/spack/build_environment.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 36dae74e84..492e490320 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -93,10 +93,16 @@ def set_compiler_environment_variables(pkg):
os.environ['FC'] = 'fc'
# Set SPACK compiler variables so that our wrapper knows what to call
- os.environ['SPACK_CC'] = compiler.cc.command
- os.environ['SPACK_CXX'] = compiler.cxx.command
- os.environ['SPACK_F77'] = compiler.f77.command
- os.environ['SPACK_FC'] = compiler.fc.command
+ if compiler.cc:
+ os.environ['SPACK_CC'] = compiler.cc.command
+ if compiler.cxx:
+ os.environ['SPACK_CXX'] = compiler.cxx.command
+ if compiler.f77:
+ os.environ['SPACK_F77'] = compiler.f77.command
+ if compiler.fc:
+ os.environ['SPACK_FC'] = compiler.fc.command
+
+ os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler)
def set_build_environment_variables(pkg):