From 6ed662c68b5babbd42156424fa39b79b7c515743 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 6 Oct 2024 16:13:14 +0800 Subject: [PATCH] CI: turn on assertion checks This turn on assertions from qbt codebase so that testers can verify the assertions really hold. PR #21499. --- .github/workflows/ci_macos.yaml | 2 +- .github/workflows/ci_ubuntu.yaml | 2 +- .github/workflows/ci_windows.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index e94c96d5d..85bda25b6 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -99,7 +99,7 @@ jobs: - name: Build qBittorrent run: | - CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \ + CXXFLAGS="$CXXFLAGS -DQT_FORCE_ASSERTS -Werror -Wno-error=deprecated-declarations" \ LDFLAGS="$LDFLAGS -gz" \ cmake \ -B build \ diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 172876852..7f22c4803 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -101,7 +101,7 @@ jobs: - name: Build qBittorrent run: | - CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -Werror" \ + CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -DQT_FORCE_ASSERTS -Werror" \ LDFLAGS="$LDFLAGS -gz" \ cmake \ -B build \ diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index f4cd316e4..3cb3b4a0c 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -127,7 +127,7 @@ jobs: - name: Build qBittorrent run: | - $env:CXXFLAGS+=" /WX" + $env:CXXFLAGS+="/DQT_FORCE_ASSERTS /WX" cmake ` -B build ` -G "Ninja" `