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