diff options
-rw-r--r-- | var/spack/repos/builtin/packages/enzo/package.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/enzo/package.py b/var/spack/repos/builtin/packages/enzo/package.py index e242d0da12..4b0c49011d 100644 --- a/var/spack/repos/builtin/packages/enzo/package.py +++ b/var/spack/repos/builtin/packages/enzo/package.py @@ -21,6 +21,14 @@ class Enzo(MakefilePackage): depends_on('hdf5~mpi') depends_on('sse2neon', when='target=aarch64:') + variant( + 'opt', default='high', + description='Optimization, some compilers do not ' + + 'produce stable code with high+ optimizations', + values=('warn', 'debug', 'cudadebug', 'high', 'aggressive'), + multi=False + ) + patch('for_aarch64.patch', when='target=aarch64:') # https://github.com/enzo-project/enzo-dev/pull/158 @@ -41,6 +49,7 @@ class Enzo(MakefilePackage): with working_dir('src/enzo'): copy('Make.mach.linux-gnu', 'Make.mach.spack') + filter_file('^MACH_FILE.*', 'MACH_FILE = Make.mach.spack', 'Make.mach.spack') @@ -57,12 +66,17 @@ class Enzo(MakefilePackage): def build(self, spec, prefix): with working_dir('src/enzo'): make('machine-spack') - make('opt-high') + make('opt-' + self.spec.variants['opt'].value) make('show-config') make() + with working_dir('src/inits'): + make() + with working_dir('src/ring'): + make() def install(self, spec, prefix): install_tree('bin', prefix.bin) install_tree('doc', prefix.doc) install_tree('input', prefix.input) install_tree('run', prefix.run) + install(join_path('src', 'ring', 'ring.exe'), join_path(prefix.bin, 'ring')) |