Kripke variants.

This commit is contained in:
Todd Gamblin 2016-05-10 00:31:06 -07:00
parent 2e0ee5404d
commit e3115aa505

View File

@ -9,15 +9,19 @@ class Kripke(Package):
version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf')
variant('mpi', default=True, description='Enable MPI support') variant('mpi', default=True, description='Build with MPI.')
variant('openmp', default=True, description='Build with OpenMP enabled.')
depends_on('mpi', when="+mpi") depends_on('mpi', when="+mpi")
def install(self, spec, prefix): def install(self, spec, prefix):
with working_dir('build', create=True): with working_dir('build', create=True):
def enabled(variant):
return (1 if variant in spec else 0)
cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', cmake('-DCMAKE_INSTALL_PREFIX:PATH=.',
'-DENABLE_OPENMP=1', '-DENABLE_OPENMP=%d' % enabled('+openmp'),
'-DENABLE_MPI=1', '-DENABLE_MPI=%d' % enabled('+mpi'),
'..', '..',
*std_cmake_args) *std_cmake_args)
make() make()