mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2024-12-03 11:01:03 +00:00
c604e93769
gcc (tested 8-10) has a sever performance penalty on gigantic switch statements like in nids.cpp, clang is at least 10 times faster
30 lines
595 B
Bash
Executable File
30 lines
595 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
cmake_args=
|
|
CLANG=
|
|
command -v clang > /dev/null && CLANG=1
|
|
|
|
# CI uses pre-built Boost
|
|
if [[ -z "${CI}" ]]; then
|
|
# Create build dir
|
|
mkdir -p external/boost-build
|
|
cd external/boost
|
|
|
|
chmod +x tools/build/src/engine/build.sh
|
|
sh bootstrap.sh
|
|
|
|
# Build our Boost subset
|
|
./b2 --ignore-site-config -j$(nproc) --build-dir=../boost-build --stagedir=../boost-build stage
|
|
cd ../..
|
|
fi
|
|
|
|
if [ "$CLANG" ]; then
|
|
cmake_args="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
|
|
fi
|
|
|
|
# Generate project files
|
|
mkdir -p build-linux
|
|
cd build-linux
|
|
cmake .. -GNinja ${cmake_args}
|