diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-10 01:33:13 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-10 01:33:13 -0700 |
commit | 6c46a5d62371d1dc3e512d5665d0385a5335b238 (patch) | |
tree | 01d9f378d241d19f7113f8f2c57734e680beb9da /var | |
parent | 2a38ec4c9342803ab9fc7faf4429c29d33ad6fd5 (diff) | |
parent | 67d64b804f5b08bc9e4493efd25ab549333e550e (diff) | |
download | spack-6c46a5d62371d1dc3e512d5665d0385a5335b238.tar.gz spack-6c46a5d62371d1dc3e512d5665d0385a5335b238.tar.bz2 spack-6c46a5d62371d1dc3e512d5665d0385a5335b238.tar.xz spack-6c46a5d62371d1dc3e512d5665d0385a5335b238.zip |
Merge pull request #807 from gartung/fftw-openmp
FFTW: openmp needs to be an option for clang build
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/fftw/package.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index bc129aaf1a..4ffc787594 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -42,7 +42,7 @@ class Fftw(Package): variant('float', default=True, description='Produces a single precision version of the library') variant('long_double', default=True, description='Produces a long double precision version of the library') variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - + variant('openmp', default=False, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') @@ -52,8 +52,15 @@ class Fftw(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix, '--enable-shared', - '--enable-threads', - '--enable-openmp'] + '--enable-threads'] + # Add support for OpenMP + if '+openmp' in spec: + # Note: Apple's Clang does not support OpenMP. + if spec.satisfies('%clang'): + ver = str(self.compiler.version) + if ver.endswith('-apple'): + raise InstallError("Apple's clang does not support OpenMP") + options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") if '+mpi' in spec: |