Precompiled Headers and AUTORCC compilation failures
I've added a GitHub Action script to build Qt Creator with CMake 3.16.2, which has precomipled headers enabled.
The build matrix looks like this (example run)
-
✔ Windows Latest - MSVC 2019 -
❌ Windows Latest - MinGW 8.1 -
❌ Ubuntu Latest - GCC 7.2 -
✔ macOS latest - AppleClang 11
The error is:
g++.exe: error: src/libs/3rdparty/syntax-highlighting/KSyntaxHighlighting_autogen/QMMQJXFHCD/qrc_theme-data.cpp: No such file or directory
g++.exe: fatal error: no input files
The directory structure when compiled BUILD_WITH_PCH=ON
(by default):
./46IEQ6DIVK
./46IEQ6DIVK/moc_definitiondownloader.cpp
./46IEQ6DIVK/moc_syntaxhighlighter.cpp
./46IEQ6DIVK/moc_theme.cpp
./include
./mocs_compilation.cpp
./moc_predefs.h
./QMMQJXFHCD
./QMMQJXFHCD/moc_definitiondownloader.cpp
./QMMQJXFHCD/moc_syntaxhighlighter.cpp
./QMMQJXFHCD/moc_theme.cpp
And the version with BUILD_WITH_PCH=OFF
:
./46IEQ6DIVK
./46IEQ6DIVK/moc_definitiondownloader.cpp
./46IEQ6DIVK/moc_syntaxhighlighter.cpp
./46IEQ6DIVK/moc_theme.cpp
./include
./mocs_compilation.cpp
./moc_predefs.h
./QMMQJXFHCD
./QMMQJXFHCD/qrc_theme-data.cpp
The project should compile both with or without PCHs.