From be45abe6be99497054fb19c7f0e0d5813874073c Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 17 Jun 2020 16:59:51 +0200 Subject: [PATCH 1/4] gui.pro: aligned qmake warnings with make ones --- gui/gui.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/gui.pro b/gui/gui.pro index 841fe4383..5af7108a5 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -198,11 +198,11 @@ win32 { } contains(QMAKE_CC, gcc) { - QMAKE_CXXFLAGS += -std=c++11 -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-deprecated-declarations + QMAKE_CXXFLAGS += -std=c++0x -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar } contains(QMAKE_CXX, clang++) { - QMAKE_CXXFLAGS += -std=c++11 + QMAKE_CXXFLAGS += -std=c++0x -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar } contains(HAVE_QCHART, [yY][eE][sS]) { From 56c4546edeb07f24ca4efc62f0ae9fd3cadcb093 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 17 Jun 2020 17:20:44 +0200 Subject: [PATCH 2/4] added precompiled header for qmake --- gui/gui.pro | 3 +++ gui/precompiled_qmake.h | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 gui/precompiled_qmake.h diff --git a/gui/gui.pro b/gui/gui.pro index 5af7108a5..b1c93d11e 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -103,6 +103,9 @@ contains(LINKCORE, [yY][eE][sS]) { include($$PWD/../lib/lib.pri) } +CONFIG += precompile_header +PRECOMPILED_HEADER = precompiled_qmake.h + HEADERS += aboutdialog.h \ application.h \ applicationdialog.h \ diff --git a/gui/precompiled_qmake.h b/gui/precompiled_qmake.h new file mode 100644 index 000000000..1042ca82d --- /dev/null +++ b/gui/precompiled_qmake.h @@ -0,0 +1,23 @@ +/* + * Cppcheck - A tool for static C/C++ code analysis + * Copyright (C) 2007-2020 Cppcheck team. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#include "precompiled.h" +#include +#include +#include From 0302ab217afde04aa1c2e36a817f1c3f2d58c82c Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 17 Jun 2020 17:21:04 +0200 Subject: [PATCH 3/4] .gitignore: added gui/.qmake.stash --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e37e3e2d8..4b9e0fd61 100644 --- a/.gitignore +++ b/.gitignore @@ -113,4 +113,7 @@ cmake-* # clang tooling temporary files .clangd/ -compile_commands.json \ No newline at end of file +compile_commands.json + +# qmake +/gui/.qmake.stash \ No newline at end of file From 57201cf8d50613d9635e56df3bf69a352ffeb18f Mon Sep 17 00:00:00 2001 From: firewave Date: Sun, 13 Sep 2020 23:06:45 +0200 Subject: [PATCH 4/4] gui.pro: disable precompiled headers for older VS versions --- gui/gui.pro | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gui/gui.pro b/gui/gui.pro index b1c93d11e..8800ee439 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -103,8 +103,18 @@ contains(LINKCORE, [yY][eE][sS]) { include($$PWD/../lib/lib.pri) } -CONFIG += precompile_header -PRECOMPILED_HEADER = precompiled_qmake.h +win32-msvc* { + MSVC_VER = $$(VisualStudioVersion) + message($$MSVC_VER) + MSVC_VER_SPLIT = $$split(MSVC_VER, .) + MSVC_VER_MAJOR = $$first(MSVC_VER_SPLIT) + # doesn't compile with older VS versions - assume VS2019 (16.x) is the first working for now + !lessThan(MSVC_VER_MAJOR, 16) { + message("using precompiled header") + CONFIG += precompile_header + PRECOMPILED_HEADER = precompiled_qmake.h + } +} HEADERS += aboutdialog.h \ application.h \