aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmaketool.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-09-14 12:28:14 +0200
committerTobias Hunger <tobias.hunger@qt.io>2016-09-15 15:25:14 +0000
commit9dda516b085fd418caa0b58539d5b58187d6c904 (patch)
tree8f28b3a84b7d088b9ede9e5ed08e9197f171cf52 /src/plugins/cmakeprojectmanager/cmaketool.cpp
parentb57f20f6337c12963f1c60190bf2c9976d183fe7 (diff)
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmaketool.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketool.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp
index b5490ac868c..956e60b093a 100644
--- a/src/plugins/cmakeprojectmanager/cmaketool.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp
@@ -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");