Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -j $JOBS to the CMake invocations missing it #5698

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions catch2.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: Catch2
version: "%(tag_basename)s"
tag: v3.7.0
tag: v3.7.1
source: https://github.com/catchorg/Catch2
requires:
- "GCC-Toolchain:(?!osx)"
Expand All @@ -17,7 +17,7 @@ cmake "$SOURCEDIR" \
-DBUILD_SHARED_LIBS=ON \
-GNinja -DCMAKE_INSTALL_PREFIX="$INSTALLROOT"

cmake --build . --target install
cmake --build . --target install ${JOBS:+-- -j$JOBS}

# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
Expand Down
27 changes: 7 additions & 20 deletions faircmakemodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,16 @@ source: https://github.com/FairRootGroup/FairCMakeModules
build_requires:
- CMake
- "GCC-Toolchain:(?!osx)"
- alibuild-recipe-tools
---
#!/bin/sh

cmake -S $SOURCEDIR -B . \
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} \
cmake -S "$SOURCEDIR" -B . \
-DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \
${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} \
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE}

cmake --build . --target install
cmake --build . --target install ${JOBS:+-- -j$JOBS}

# Modulefile
mkdir -p etc/modulefiles
cat > etc/modulefiles/$PKGNAME <<EoF
#%Module1.0
proc ModulesHelp { } {
global version
puts stderr "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
}
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0
# Our environment
set FAIRCMAKEMODULES_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles
mkdir -p "$INSTALLROOT/etc/modulefiles"
alibuild-generate-module --cmake > "$INSTALLROOT/etc/modulefiles/$PKGNAME"
8 changes: 4 additions & 4 deletions fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ prepend_path:
ROOT_INCLUDE_PATH: "$FMT_ROOT/include"
---
#!/bin/bash -e
cmake $SOURCEDIR -GNinja -DCMAKE_INSTALL_PREFIX=$INSTALLROOT -DFMT_TEST=OFF -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=ON
cmake "$SOURCEDIR" -GNinja -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" -DFMT_TEST=OFF -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=ON

cmake --build . --target install
cmake --build . --target install ${JOBS:+-- -j$JOBS}

# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"

alibuild-generate-module --lib --cmake > $MODULEFILE
cat << EOF >> $MODULEFILE
alibuild-generate-module --lib --cmake > "$MODULEFILE"
cat << EOF >> "$MODULEFILE"
prepend-path ROOT_INCLUDE_PATH \$PKG_ROOT/include
EOF
6 changes: 3 additions & 3 deletions ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ build_requires:
- alibuild-recipe-tools
---
#!/bin/bash
cmake -Bbuild-cmake $SOURCEDIR
cmake --build build-cmake
cmake -Bbuild-cmake "$SOURCEDIR"
cmake --build build-cmake ${JOBS:+-j$JOBS}

mkdir -p $INSTALLROOT/bin
mkdir -p "$INSTALLROOT"/bin
cp build-cmake/ninja "$INSTALLROOT/bin"

mkdir -p "$INSTALLROOT/etc/modulefiles"
Expand Down
Loading