From b5d63c81669e46c49ca97c7e1c5fee3eae6dd477 Mon Sep 17 00:00:00 2001 From: Vasily Date: Tue, 16 Apr 2019 18:45:20 +0200 Subject: [PATCH] Update required Qt version to 5.12 On Ubuntu 16.04 and 18.04 it is not possible to get Qt 5.12 from the official repo. You will need to get it from https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.12.2-bionic which places the files in /opt. This leads qmake to including the files as non system headers, which makes them spam errors. Adding them as -isystem headers first prevents this. --- advancedSettings.pro | 4 ++-- build_scripts/qt/sources.pri | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/advancedSettings.pro b/advancedSettings.pro index 918af1f..4396480 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -3,8 +3,8 @@ CONFIG += c++1z DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE -lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.6 or higher") -lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6 or higher") +lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.12 or higher") +lessThan(QT_MINOR_VERSION, 12): error("requires Qt 5.12 or higher") TARGET = AdvancedSettings TEMPLATE = app diff --git a/build_scripts/qt/sources.pri b/build_scripts/qt/sources.pri index 7aee945..51fb603 100644 --- a/build_scripts/qt/sources.pri +++ b/build_scripts/qt/sources.pri @@ -72,6 +72,9 @@ win32-clang-msvc { # Anything g++ or clang # In order to suppress warnings in third party headers *clang|*clang-g++|*clang-libc++|*g++* { + QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS] + QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtCore + QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtGui QMAKE_CXXFLAGS += -isystem ../third-party/openvr/headers QMAKE_CXXFLAGS += -isystem ../third-party/easylogging++ }