Make builtin flag handlers available in package scope (#8668)

* Push default flag handlers into module scope

* Preserve backwards compatibility of builtin flag handler names

Ensure Spack continues to work for packages using the `Package.env_flags` idiom and equivalent.

* update docs and tests to match

* Update packages to match new syntax
This commit is contained in:
Greg Becker
2018-10-09 15:18:31 -07:00
committed by GitHub
parent 54bd049d99
commit ca0d9ae7f0
6 changed files with 47 additions and 40 deletions

View File

@@ -48,7 +48,7 @@ class Hiop(CMakePackage):
depends_on('lapack')
depends_on('blas')
flag_handler = CMakePackage.build_system_flags
flag_handler = build_system_flags
def cmake_args(self):
args = []

View File

@@ -59,7 +59,7 @@ class Ipopt(AutotoolsPackage):
patch('ipopt_ppc_build.patch', when='arch=ppc64le')
flag_handler = AutotoolsPackage.build_system_flags
flag_handler = build_system_flags
build_directory = 'spack-build'
# IPOPT does not build correctly in parallel on OS X