2024-02-10 21:39:16 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-02-10 22:13:53 +01:00
|
|
|
# TODO: Investigate if the -fno-sized-deallocation flag is still necessary
|
|
|
|
# TODO: Test appimage/deb creation
|
|
|
|
|
2024-02-10 21:39:16 +01:00
|
|
|
set -e
|
|
|
|
|
2024-02-10 22:13:53 +01:00
|
|
|
env
|
|
|
|
|
2024-02-27 20:29:08 +01:00
|
|
|
BUILD_TESTS="On"
|
|
|
|
BUILD_BENCHMARKS="ON"
|
|
|
|
|
|
|
|
ubuntu_version="$(lsb_release -sr)"
|
|
|
|
if [ "$ubuntu_version" = "20.04" ]; then
|
|
|
|
BUILD_TESTS="Off"
|
|
|
|
BUILD_BENCHMARKS="Off"
|
|
|
|
fi
|
|
|
|
|
2024-02-10 22:13:53 +01:00
|
|
|
rm -rf build
|
2024-02-10 21:39:16 +01:00
|
|
|
mkdir build
|
2024-02-10 22:13:53 +01:00
|
|
|
cmake \
|
2024-02-10 21:39:16 +01:00
|
|
|
-B build \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=appdir/usr/ \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2024-02-11 19:11:30 +01:00
|
|
|
-DBUILD_APP=On \
|
2024-02-27 20:29:08 +01:00
|
|
|
-DBUILD_TESTS="$BUILD_TESTS" \
|
|
|
|
-DBUILD_BENCHMARKS="$BUILD_BENCHMARKS" \
|
2024-02-10 21:39:16 +01:00
|
|
|
-DUSE_PRECOMPILED_HEADERS=OFF \
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
|
|
|
|
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
|
|
|
|
-DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \
|
2024-02-11 19:11:30 +01:00
|
|
|
-DCHATTERINO_STATIC_QT_BUILD=On \
|
2024-02-10 22:13:53 +01:00
|
|
|
-DCMAKE_CXX_FLAGS="-fno-sized-deallocation" \
|
|
|
|
.
|
2024-02-10 21:39:16 +01:00
|
|
|
cmake --build build
|
|
|
|
|
|
|
|
# sh ./../.CI/CreateAppImage.sh
|
|
|
|
# sh ./../.CI/CreateUbuntuDeb.sh
|