diff options
author | lukelabrie | 2024-01-27 12:16:38 +0100 |
---|---|---|
committer | lukelabrie | 2024-01-27 12:16:38 +0100 |
commit | 9b55e2a9d7dcec76640e3cb754b42376496b4e56 (patch) | |
tree | d91ea28b305ba983854d901eaaeb49f8c7192cc0 | |
parent | 172a43e27e37f4e4ed0da39273d388c9c7ecb94c (diff) | |
download | aur-9b55e2a9d7dcec76640e3cb754b42376496b4e56.tar.gz |
more robust parallel build
-rwxr-xr-x | PKGBUILD | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -55,12 +55,13 @@ build() { -DOPENMC_USE_MPI=ON \ -DHDF5_PREFER_PARALLEL=ON \ -DCMAKE_INSTALL_PREFIX=/opt/openmc - _ccores=$(nproc) - if [ -z "${_ccores}" ]; then - make - else - make -j ${_ccores} - fi + _ccores=$(nproc) + # check if _ccores is a positive integer, if not, serial build + if [[ "${_ccores}" =~ ^[1-9][0-9]*$ ]]; then + make -j ${_ccores} + else + make + fi # build python layer python -m build --wheel --no-isolation ../ |