forked from qt-creator/qt-creator
CppTools: Handle not only "-std=X" but also "--std=X"
Fixes: QTCREATORBUG-22444 Change-Id: Iedb0b17a26724d0cc8233a3bad273f3e6bd7462d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -755,7 +755,7 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
||||
|
||||
// Check whether a language version is already used.
|
||||
QString theOption = option;
|
||||
if (theOption.startsWith("-std=")) {
|
||||
if (theOption.startsWith("-std=") || theOption.startsWith("--std=")) {
|
||||
m_compilerFlags.isLanguageVersionSpecified = true;
|
||||
theOption.replace("=c18", "=c17");
|
||||
theOption.replace("=gnu18", "=gnu17");
|
||||
|
Reference in New Issue
Block a user