diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2016-06-14 11:19:05 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2016-06-15 14:17:29 -0500 |
commit | 9cf1257be4b6203f5a90ee5b410902daafa53d7b (patch) | |
tree | 1e92e477661c2c391495ba0650cdc88f8c0dacdb /var | |
parent | deb4f919cf64717036ee0c8c1b6cb00d46b579aa (diff) | |
download | spack-9cf1257be4b6203f5a90ee5b410902daafa53d7b.tar.gz spack-9cf1257be4b6203f5a90ee5b410902daafa53d7b.tar.bz2 spack-9cf1257be4b6203f5a90ee5b410902daafa53d7b.tar.xz spack-9cf1257be4b6203f5a90ee5b410902daafa53d7b.zip |
Filter compilers
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/psi4/package.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py index e02dc65fd4..4bd47302ab 100644 --- a/var/spack/repos/builtin/packages/psi4/package.py +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os class Psi4(Package): @@ -74,3 +75,26 @@ class Psi4(Package): make() # ctest() make('install') + + self.filter_compilers() + + def filter_compilers(self): + """Run after install to tell the configuration files to + use the compilers that Spack built the package with. + + If this isn't done, they'll have PLUGIN_CXX set to + Spack's generic cxx. We want it to be bound to + whatever compiler it was built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + + cc_files = ['bin/psi4-config'] + cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h'] + + for filename in cc_files: + filter_file(os.environ['CC'], self.compiler.cc, + os.path.join(self.prefix, filename), **kwargs) + + for filename in cxx_files: + filter_file(os.environ['CXX'], self.compiler.cxx, + os.path.join(self.prefix, filename), **kwargs) |