From 4a1a29d9c5ee3502f5746f26a6e981e27548b4f5 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 15 Feb 2016 10:26:34 +0100 Subject: [PATCH] CMake: Fix generator parsing on Windows Change-Id: I8afc8651fc1299a2a8782749966fd7ba770c9423 Reviewed-by: Tim Jenssen --- src/plugins/cmakeprojectmanager/cmaketool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index 8ea7fdead90..57207982d7d 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -152,12 +152,14 @@ QStringList CMakeTool::supportedGenerators() const foreach (const QString &line, lines) { if (line.isEmpty()) continue; - if (line == QLatin1String("Generators")) + if (line == QLatin1String("Generators")) { inGeneratorSection = true; + continue; + } if (!inGeneratorSection) continue; - if (line.startsWith(QLatin1String(" "))) { + if (line.startsWith(QLatin1String(" ")) && line.at(3) != QLatin1Char(' ')) { int pos = line.indexOf(QLatin1Char('=')); if (pos < 0) pos = line.length();