summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Chiusole <bebosudo@users.noreply.github.com>2019-03-13 01:48:45 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-03-12 19:48:45 -0500
commit46fb6ed5b6f2ad105f2e9529e721404aaea72958 (patch)
tree149a8f64d004c936c14619b0e6bad6aeb14c9447
parentdc5b16a8e9ba57bff77575221fef687bbc4eac9c (diff)
downloadspack-46fb6ed5b6f2ad105f2e9529e721404aaea72958.tar.gz
spack-46fb6ed5b6f2ad105f2e9529e721404aaea72958.tar.bz2
spack-46fb6ed5b6f2ad105f2e9529e721404aaea72958.tar.xz
spack-46fb6ed5b6f2ad105f2e9529e721404aaea72958.zip
Revert to manual flag enabling, due to RegCM bug in configure. (#10863)
The configure of RegCM treats --disable-FEATURE as --enable-FEATURE, so we cannot use enable_or_disable.
-rw-r--r--var/spack/repos/builtin/packages/regcm/package.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/regcm/package.py b/var/spack/repos/builtin/packages/regcm/package.py
index 48ba662691..9f1dba7371 100644
--- a/var/spack/repos/builtin/packages/regcm/package.py
+++ b/var/spack/repos/builtin/packages/regcm/package.py
@@ -97,10 +97,13 @@ class Regcm(AutotoolsPackage):
raise InstallError('The GCC compiler does not support '
'multiple architecture optimizations.')
- args += self.enable_or_disable('extension')
+ # RegCM configure script treats --disable-X as --enable-X, so we
+ # cannot use enable_or_disable; enable only the flags requested.
+ args += ('--enable-' + ext for ext in optimizations)
for opt in ('debug', 'profile', 'singleprecision'):
- args += self.enable_or_disable(opt)
+ if ('+' + opt) in self.spec:
+ args.append('--enable-' + opt)
# RegCM SVN6916 introduced a specific flag to use some pnetcdf calls.
if '+pnetcdf' in self.spec and '@4.7.0-SVN6916:' in self.spec: