2020-11-12 06:21:35 +01:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
set -o pipefail
|
|
|
|
|
2021-09-12 21:27:29 +02:00
|
|
|
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
2020-11-12 06:21:35 +01:00
|
|
|
# ccache configurations
|
|
|
|
export CCACHE_CPP2=yes
|
|
|
|
export CCACHE_SLOPPINESS=time_macros
|
|
|
|
|
|
|
|
export CC="ccache clang"
|
|
|
|
export CXX="ccache clang++"
|
2022-09-21 18:36:12 +02:00
|
|
|
export OBJC="clang"
|
|
|
|
export ASM="clang"
|
2020-11-12 06:21:35 +01:00
|
|
|
|
|
|
|
ccache -s
|
|
|
|
|
|
|
|
mkdir build && cd build
|
2023-01-15 17:15:42 +01:00
|
|
|
# TODO: LibreSSL ASM disabled due to platform detection issues in build.
|
2021-09-12 21:27:29 +02:00
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release \
|
2023-03-01 18:58:09 +01:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES="$TARGET_ARCH" \
|
2021-09-12 21:27:29 +02:00
|
|
|
-DENABLE_QT_TRANSLATION=ON \
|
|
|
|
-DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
|
|
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
|
|
|
-DUSE_DISCORD_PRESENCE=ON \
|
2023-01-06 00:16:40 +01:00
|
|
|
-DENABLE_ASM=OFF \
|
2021-09-12 21:27:29 +02:00
|
|
|
-GNinja
|
2020-11-12 06:21:35 +01:00
|
|
|
ninja
|
|
|
|
|
|
|
|
ccache -s
|
|
|
|
|
2023-03-01 18:58:09 +01:00
|
|
|
CURRENT_ARCH=`arch`
|
|
|
|
if [ "$TARGET_ARCH" = "$CURRENT_ARCH" ]; then
|
|
|
|
ctest -VV -C Release
|
|
|
|
fi
|