forked from qt-creator/qt-creator
CMake: Parse cmake syntax errors
Improve the CMakeParser so that it picks up the most common errors/warnings that cmake throws when running into errors while parsing its CMakeLists.txt files. Change-Id: Ie3774695418f13aa3869d78802c1a552e6fd384e Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include <projectexplorer/ioutputparser.h>
|
||||
#include <projectexplorer/task.h>
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -43,13 +45,17 @@ protected:
|
||||
void doFlush() override;
|
||||
|
||||
private:
|
||||
enum TripleLineError { NONE, LINE_LOCATION, LINE_DESCRIPTION, LINE_DESCRIPTION2 };
|
||||
|
||||
TripleLineError m_expectTripleLineErrorData = NONE;
|
||||
|
||||
ProjectExplorer::Task m_lastTask;
|
||||
QRegExp m_commonError;
|
||||
QRegExp m_nextSubError;
|
||||
QRegularExpression m_locationLine;
|
||||
bool m_skippedFirstEmptyLine = false;
|
||||
int m_lines = 0;
|
||||
};
|
||||
|
||||
} // namespace CMakeProjectManager
|
||||
} // namespace Internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user