forked from qt-creator/qt-creator
Clang: Fix language version detection with PCH-s in CMake enabled
Filter out the PCH flags when detecting macros and language version. Fixes: QTCREATORBUG-21860 Change-Id: I25c63f1409c16db3623d1c8f43ffd5d2bd0f6748 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -741,6 +741,15 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (option.startsWith("/Y", Qt::CaseSensitive)
|
||||
|| (option.startsWith("/F", Qt::CaseSensitive) && option != "/F")) {
|
||||
// Precompiled header flags.
|
||||
// Skip also the next option if it's not glued to the current one.
|
||||
if (option.size() > 3)
|
||||
skipNext = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check whether a language version is already used.
|
||||
QString theOption = option;
|
||||
if (theOption.startsWith("-std=")) {
|
||||
|
||||
Reference in New Issue
Block a user