diff options
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index e5685dc5e05..8dfe0c79773 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -172,7 +172,7 @@ void CompilerOptionsBuilder::addSyntaxOnly() isClStyle() ? add("/Zs") : add("-fsyntax-only"); } -static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt) +QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt) { QStringList options; @@ -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=")) { |