summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukelabrie2024-01-27 00:43:33 +0100
committerlukelabrie2024-01-27 00:43:33 +0100
commit172a43e27e37f4e4ed0da39273d388c9c7ecb94c (patch)
treee475c1cd0290ef2b4f6e694e8864ba4204bd8054
parent1d6194c2d88d7b3f98e373d465a20ff7f87ffd91 (diff)
downloadaur-172a43e27e37f4e4ed0da39273d388c9c7ecb94c.tar.gz
more robust parallel build
-rwxr-xr-xPKGBUILD18
1 files changed, 8 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c5ee5781aed7..f9962b318cb7 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -55,17 +55,15 @@ build() {
-DOPENMC_USE_MPI=ON \
-DHDF5_PREFER_PARALLEL=ON \
-DCMAKE_INSTALL_PREFIX=/opt/openmc
- _ccores=`cat /proc/cpuinfo |grep CPU|wc -l`
- if [ "x$1" != "x" ]; then
- _ccores=$1
- fi
- make -j ${_ccores}
+ _ccores=$(nproc)
+ if [ -z "${_ccores}" ]; then
+ make
+ else
+ make -j ${_ccores}
+ fi
- # build python layer
- python \
- -m build \
- --wheel \
- --no-isolation ../
+ # build python layer
+ python -m build --wheel --no-isolation ../
}
package() {