make /bin/build.sh use clang if it can find it by default
This commit is contained in:
parent
024f17de91
commit
73b6ab047d
13
bin/build.sh
13
bin/build.sh
@ -5,8 +5,13 @@ if [ -x "$(command -v ninja)" ]; then
|
||||
generator="-G Ninja"
|
||||
fi
|
||||
|
||||
if [ "$1" = "web" ]; then
|
||||
emcmake cmake $generator -B .build-web "${@:2}" && cmake --build .build-web --parallel
|
||||
else
|
||||
cmake $generator -B .build "$@" && cmake --build .build --parallel
|
||||
# check whether clang is around (it's just better)
|
||||
if [ -x "$(command -v clang)" ]; then
|
||||
cc="-DCMAKE_C_COMPILER=clang"
|
||||
fi
|
||||
|
||||
if [ "$1" = "web" ]; then
|
||||
emcmake cmake $generator $cc -B .build-web "${@:2}" && cmake --build .build-web --parallel
|
||||
else
|
||||
cmake $generator $cc -B .build "$@" && cmake --build .build --parallel
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user