Commit ac627bb7 authored by Daniel Teske's avatar Daniel Teske
Browse files

CMake: Don't expect the version in --help output



Since we don't actually need it anymore, just remove the code.

Task-number: QTCREATORBUG-10452
Change-Id: I59f55f3a319240826569de308491cac697c4f045
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 3716791d
...@@ -86,16 +86,11 @@ void CMakeValidator::finished(int exitCode) ...@@ -86,16 +86,11 @@ void CMakeValidator::finished(int exitCode)
} }
if (m_state == CMakeValidator::RunningBasic) { if (m_state == CMakeValidator::RunningBasic) {
QByteArray response = m_process->readAll(); QByteArray response = m_process->readAll();
QRegExp versionRegexp(QLatin1String("^cmake version ([\\d\\.]*)"));
versionRegexp.indexIn(QString::fromLocal8Bit(response));
m_hasCodeBlocksMsvcGenerator = response.contains("CodeBlocks - NMake Makefiles"); m_hasCodeBlocksMsvcGenerator = response.contains("CodeBlocks - NMake Makefiles");
m_hasCodeBlocksNinjaGenerator = response.contains("CodeBlocks - Ninja"); m_hasCodeBlocksNinjaGenerator = response.contains("CodeBlocks - Ninja");
m_version = versionRegexp.cap(1);
if (versionRegexp.capturedTexts().size() > 3)
m_version += QLatin1Char('.') + versionRegexp.cap(3);
if (m_version.isEmpty()) { if (response.isEmpty()) {
m_state = CMakeValidator::Invalid; m_state = CMakeValidator::Invalid;
} else { } else {
m_state = CMakeValidator::RunningFunctionList; m_state = CMakeValidator::RunningFunctionList;
......
...@@ -74,7 +74,6 @@ private: ...@@ -74,7 +74,6 @@ private:
QProcess *m_process; QProcess *m_process;
bool m_hasCodeBlocksMsvcGenerator; bool m_hasCodeBlocksMsvcGenerator;
bool m_hasCodeBlocksNinjaGenerator; bool m_hasCodeBlocksNinjaGenerator;
QString m_version;
QString m_executable; QString m_executable;
QMap<QString, QStringList> m_functionArgs; QMap<QString, QStringList> m_functionArgs;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment