forked from qt-creator/qt-creator
QbsProjectManager: Make C++20 projects work with MSVC
Task-number: QTCREATORBUG-26089 Change-Id: I9f37ca3024f95a41724bf7b4e48ee8dbd340cd75 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -850,7 +850,9 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags,
|
|||||||
cxxFlags << "/TP";
|
cxxFlags << "/TP";
|
||||||
if (!enableRtti.isUndefined())
|
if (!enableRtti.isUndefined())
|
||||||
cxxFlags << QLatin1String(enableRtti.toBool() ? "/GR" : "/GR-");
|
cxxFlags << QLatin1String(enableRtti.toBool() ? "/GR" : "/GR-");
|
||||||
if (getCppProp("cxxLanguageVersion").toArray().contains("c++17"))
|
if (getCppProp("cxxLanguageVersion").toArray().contains("c++20"))
|
||||||
|
cxxFlags << "/std:c++20";
|
||||||
|
else if (getCppProp("cxxLanguageVersion").toArray().contains("c++17"))
|
||||||
cxxFlags << "/std:c++17";
|
cxxFlags << "/std:c++17";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user