forked from qt-creator/qt-creator
CMake: Do not pass on normal CMake output to other parsers
This should avoid false positives with lines like this: -- Qt5 install prefix: /usr/lib which the toolchain may misinterpret otherwise. Task-number: QTCREATORBUG-22837 Change-Id: I30a6fef6771edf37a9737366ae717d149cccfab6 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -105,6 +105,9 @@ void CMakeParser::stdError(const QString &line)
|
||||
Utils::FilePath(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM);
|
||||
m_lines = 1;
|
||||
return;
|
||||
} else if (trimmedLine.startsWith("-- ") || trimmedLine.startsWith(" * ")) {
|
||||
// Do not pass on lines starting with "-- " or "* ". Those are typical CMake output
|
||||
return;
|
||||
}
|
||||
IOutputParser::stdError(line);
|
||||
return;
|
||||
@@ -288,6 +291,10 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data()
|
||||
Utils::FilePath::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9,
|
||||
categoryBuild))
|
||||
<< QString();
|
||||
QTest::newRow("eat normal CMake output")
|
||||
<< QString::fromLatin1("-- Qt5 install prefix: /usr/lib\n"
|
||||
" * Plugin componentsplugin, with CONDITION TARGET QmlDesigner")
|
||||
<< OutputParserTester::STDERR << QString() << QString() << (Tasks()) << QString();
|
||||
}
|
||||
|
||||
void Internal::CMakeProjectPlugin::testCMakeParser()
|
||||
|
||||
Reference in New Issue
Block a user