From f4030c4b1ae8ac3001bfc9f85e24a51ad2f08d79 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:15:41 +0200 Subject: [PATCH] Fix #11791 Build regression with GCC 13 (#5193) Patch supplied by Joachim Reichel. --- .github/workflows/CI-unixish.yml | 12 ++++++++++++ gui/CMakeLists.txt | 8 ++++---- tools/triage/CMakeLists.txt | 8 ++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index f5f25d51b19..62007c40ba6 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -85,6 +85,18 @@ jobs: sudo apt-get update sudo apt-get install libxml2-utils qtbase5-dev qttools5-dev libqt5charts5-dev qtchooser + - name: Set up GCC + uses: egor-tensin/setup-gcc@v1 + if: matrix.os == 'ubuntu-22.04' + with: + version: 13 + platform: x64 + + - name: Select compiler + run: | + echo "CXX=g++-13" >> $GITHUB_ENV + if: matrix.os == 'ubuntu-22.04' + # coreutils contains "nproc" - name: Install missing software on macos if: contains(matrix.os, 'macos') diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index c646f15fdd1..2614b1a76ae 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -9,10 +9,10 @@ CheckOptions: - { key: HeaderFileExtensions, value: 'x' } ") - add_compile_definitions($<$>:-DQT_NO_DEBUG>) - add_compile_definitions($<$>:-DQT_NO_DEBUG_OUTPUT>) - add_compile_definitions($<$>:-DQT_NO_WARNING_OUTPUT>) - add_compile_definitions($<$:-DQT_DEBUG>) + add_compile_definitions($<$>:QT_NO_DEBUG>) + add_compile_definitions($<$>:QT_NO_DEBUG_OUTPUT>) + add_compile_definitions($<$>:QT_NO_WARNING_OUTPUT>) + add_compile_definitions($<$:QT_DEBUG>) file(GLOB hdrs "*.h") file(GLOB srcs "*.cpp") diff --git a/tools/triage/CMakeLists.txt b/tools/triage/CMakeLists.txt index 73cf887ba7f..c244144f83c 100644 --- a/tools/triage/CMakeLists.txt +++ b/tools/triage/CMakeLists.txt @@ -8,10 +8,10 @@ CheckOptions: - { key: HeaderFileExtensions, value: 'x' } ") - add_compile_definitions($<$>:-DQT_NO_DEBUG>) - add_compile_definitions($<$>:-DQT_NO_DEBUG_OUTPUT>) - add_compile_definitions($<$>:-DQT_NO_WARNING_OUTPUT>) - add_compile_definitions($<$:-DQT_DEBUG>) + add_compile_definitions($<$>:QT_NO_DEBUG>) + add_compile_definitions($<$>:QT_NO_DEBUG_OUTPUT>) + add_compile_definitions($<$>:QT_NO_WARNING_OUTPUT>) + add_compile_definitions($<$:QT_DEBUG>) file(GLOB hdrs "*.h") file(GLOB srcs "*.cpp")