-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong C standard - GNU extensions enabled in PCH file but disabled in CMake #23
Comments
I have spent a while investigating this and this is indeed pretty tricky to carry I tried to convince CMake to add these for PCH target too adding relevant entries in FYI current baked in solution provided by @mick-p1982 simply bakes I am rather short on time for this project and already spend couple of hours yesterday, so any help would be appreciated. |
Hm. I think maybe it is possible to use [
{
"directory": "/home/taurus/develop/torrent-file-editor/release-qt5",
"command": "/usr/lib64/ccache/g -DHAVE_QT5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I../ -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -std=c 11 -Wall -Wextra -pedantic -Werror -Wno-error=cpp -O2 -DNDEBUG -fPIC -std=gnu 11 -o CMakeFiles/torrent-file-editor.dir/application.cpp.o -c /home/taurus/develop/torrent-file-editor/application.cpp",
"file": "/home/taurus/develop/torrent-file-editor/application.cpp"
}
] |
If there is no way to detect it with CMake then there has to be a parameter added to module's commands. I should add that C XX should be a subset of gnu XX. The module is supposed to just give your what you need to do PCH with CMake for popular platforms. If switching to gnu standard is a bridge too far, then you don't really require PCH for your project! |
On macOS, using brew llvm, it's setting the -std=gnu 17 flag instead of the -std=c 17 flag I use for the rest of the project and I get the following error when it actually uses the pch: 'GNU extensions was enabled in PCH file but is currently disabled'.
The text was updated successfully, but these errors were encountered: