diff options
author | Denis Davydov <davydden@gmail.com> | 2017-04-28 19:43:06 +0200 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-04-28 12:43:06 -0500 |
commit | a1059b5a6c185bcae5b15ec229ada27aa6928354 (patch) | |
tree | 9cbb92919bdba1ec37cc4aba77c56174891cd894 | |
parent | d970ef5404bfdbb0fdd15eb00a96652708b32332 (diff) | |
download | spack-a1059b5a6c185bcae5b15ec229ada27aa6928354.tar.gz spack-a1059b5a6c185bcae5b15ec229ada27aa6928354.tar.bz2 spack-a1059b5a6c185bcae5b15ec229ada27aa6928354.tar.xz spack-a1059b5a6c185bcae5b15ec229ada27aa6928354.zip |
dealii: fix missing -march=native in flags (#4036)
-rw-r--r-- | var/spack/repos/builtin/packages/dealii/package.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 349de680cc..5f149b74fe 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -144,6 +144,9 @@ class Dealii(CMakePackage): self.variants_check() spec = self.spec options = [] + # release flags + cxx_flags_release = [] + # debug and release flags cxx_flags = [] lapack_blas = spec['lapack'].libs + spec['blas'].libs @@ -168,11 +171,14 @@ class Dealii(CMakePackage): # Set recommended flags for maximum (matrix-free) performance, see # https://groups.google.com/forum/?fromgroups#!topic/dealii/3Yjy8CBIrgU if spec.satisfies('%gcc'): - cxx_flags.extend(['-O3', '-march=native']) + cxx_flags_release.extend(['-O3']) + cxx_flags.extend(['-march=native']) elif spec.satisfies('%intel'): - cxx_flags.extend(['-O3', '-march=native']) + cxx_flags_release.extend(['-O3']) + cxx_flags.extend(['-march=native']) elif spec.satisfies('%clang'): - cxx_flags.extend(['-O3', '-march=native', '-ffp-contract=fast']) + cxx_flags_release.extend(['-O3', '-ffp-contract=fast']) + cxx_flags.extend(['-march=native']) # Python bindings if spec.satisfies('@8.5.0:'): @@ -281,9 +287,12 @@ class Dealii(CMakePackage): ]) # collect CXX flags: - if len(cxx_flags) > 0 and '+optflags' in spec: + if len(cxx_flags_release) > 0 and '+optflags' in spec: options.extend([ - '-DCMAKE_CXX_FLAGS_RELEASE:STRING=%s' % (' '.join(cxx_flags)) + '-DCMAKE_CXX_FLAGS_RELEASE:STRING=%s' % ( + ' '.join(cxx_flags_release)), + '-DCMAKE_CXX_FLAGS:STRING=%s' % ( + ' '.join(cxx_flags)) ]) return options |