Skip to content

Instantly share code, notes, and snippets.

@pasbi
Created November 24, 2021 12:41
Show Gist options
  • Save pasbi/9efcc49b7ba7ca8ce8af5ead65082c35 to your computer and use it in GitHub Desktop.
Save pasbi/9efcc49b7ba7ca8ce8af5ead65082c35 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
source=$1
shift
config=${1:-Release}
shift || true
build=$(mktemp -d -t build-omm-XXXX)
install=$build/install
ncores=4
echo "Building omm "
echo " source: $source"
echo " build: $build"
echo " config: $config"
echo " install: $install"
echo " ncores: $ncores"
cmake -S "$source" -B "$build" -DCMAKE_INSTALL_PREFIX="$install" -DCMAKE_BUILD_TYPE="$config" "$@"
cmake --build "$build" --target install --config "$config" -j$ncores
cmake --build "$build" --target icons -j$ncores
cmake -S "$source" -B "$build"
cmake --build "$build" --target install --config "$config" -j$ncores
echo "Finished building omm. Run $build/install/bin/ommpfritt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment