Skip to content

Commit

Permalink
Script: switch to make
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Feb 1, 2025
1 parent 964ed78 commit b82dcba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Source/Script/Build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ toplvl_dir="$(realpath "$script_dir/../../")"
build_config="${1:-Debug}"
build_dir="$toplvl_dir/Build/$build_config"
threads="${2:-$(nproc)}"
generator="Unix Makefiles"

if [[ "$1" = "--help" ]] ||
[[ "$1" = "-h" ]]
Expand All @@ -13,9 +14,17 @@ then
exit
fi

if [[ $(uname -s) = *MINGW64* ]]
then
generator="MSYS Makefiles"
fi

mkdir -p "$build_dir"

cmake -S "$toplvl_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="$build_config" -DPORTABLE_INSTALL=ON -DUSE_ANGRYLION=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Ninja"
cmake -S "$toplvl_dir" -B "$build_dir" \
-DCMAKE_BUILD_TYPE="$build_config" \
-DPORTABLE_INSTALL=ON -DUSE_ANGRYLION=ON \
-G "$generator"

cmake --build "$build_dir" --parallel "$threads"

Expand Down

0 comments on commit b82dcba

Please sign in to comment.