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"
|
generator="-G Ninja"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "web" ]; then
|
# check whether clang is around (it's just better)
|
||||||
emcmake cmake $generator -B .build-web "${@:2}" && cmake --build .build-web --parallel
|
if [ -x "$(command -v clang)" ]; then
|
||||||
else
|
cc="-DCMAKE_C_COMPILER=clang"
|
||||||
cmake $generator -B .build "$@" && cmake --build .build --parallel
|
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
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user