optionally install mcpl depending on environment var

This commit is contained in:
erkn 2022-12-21 00:22:38 +01:00
parent 1ab9aa4b6f
commit 9865a129c4
2 changed files with 11 additions and 2 deletions

View file

@ -19,7 +19,7 @@ def which(program):
return None
def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False):
def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False, mcpl=False):
# Create build directory and change to it
shutil.rmtree('build', ignore_errors=True)
os.mkdir('build')
@ -54,6 +54,9 @@ def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False):
libmesh_path = os.environ.get('HOME') + '/LIBMESH'
cmake_cmd.append('-DCMAKE_PREFIX_PATH=' + libmesh_path)
if mcpl:
cmake_cmd.append('-DOPENMC_USE_MCPL=ON')
# Build in coverage mode for coverage testing
cmake_cmd.append('-DOPENMC_ENABLE_COVERAGE=on')
@ -71,9 +74,10 @@ def main():
phdf5 = (os.environ.get('PHDF5') == 'y')
dagmc = (os.environ.get('DAGMC') == 'y')
libmesh = (os.environ.get('LIBMESH') == 'y')
mcpl = (os.environ.get('MCPL') == 'y')
# Build and install
install(omp, mpi, phdf5, dagmc, libmesh)
install(omp, mpi, phdf5, dagmc, libmesh, mcpl)
if __name__ == '__main__':
main()

View file

@ -27,6 +27,11 @@ if [[ $LIBMESH = 'y' ]]; then
./tools/ci/gha-install-libmesh.sh
fi
# Install mcpl if needed
if [[ $MCPL = 'y' ]]; then
./tools/ci/gha-install-mcpl.sh
fi
# For MPI configurations, make sure mpi4py and h5py are built against the
# correct version of MPI
if [[ $MPI == 'y' ]]; then