forked from qt-creator/qt-creator
CMake: Work around bug in cmake documentation when extracting keywords
Work around a bug in the documentation of CMAKE_COMPILER_IS_GNU*, which leads to creator offering invalid completion when editing CMakeLists.txt files. Task-number: QTCREATORBUG-16852 Change-Id: I7c61445a7448bdd6f5de5f235316c260ba28e757 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -318,7 +318,9 @@ QStringList CMakeTool::parseVariableOutput(const QString &output)
|
||||
const QStringList variableList = output.split(QLatin1Char('\n'));
|
||||
QStringList result;
|
||||
foreach (const QString &v, variableList) {
|
||||
if (v.contains("<CONFIG>")) {
|
||||
if (v.startsWith("CMAKE_COMPILER_IS_GNU<LANG>")) { // This key takes a compiler name :-/
|
||||
result << "CMAKE_COMPILER_IS_GNUCC" << "CMAKE_COMPILER_IS_GNUCXX";
|
||||
} else if (v.contains("<CONFIG>")) {
|
||||
const QString tmp = QString(v).replace("<CONFIG>", "%1");
|
||||
result << tmp.arg("DEBUG") << tmp.arg("RELEASE")
|
||||
<< tmp.arg("MINSIZEREL") << tmp.arg("RELWITHDEBINFO");
|
||||
|
||||
Reference in New Issue
Block a user