Skip to content

Commit

Permalink
change: use -dumpversion to retrieve gcc version info
Browse files Browse the repository at this point in the history
  • Loading branch information
royqh1979 committed Dec 17, 2024
1 parent 46189ed commit c0d0153
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RedPandaIDE/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2309,10 +2309,10 @@ void Settings::CompilerSet::setGCCProperties(const QString& binDir, const QStrin
}
mTarget = mDumpMachine.mid(0, mDumpMachine.indexOf('-'));
QByteArray version = getCompilerOutput(binDir, c_prog, {"-dumpversion"}).trimmed();
QRegularExpression versionPattern = QRegularExpression("^[\\d]+\\.[\\d]+.*$");
if (auto m = versionPattern.match(version); !m.hasMatch()) {
version = getCompilerOutput(binDir, c_prog, {"-dumpfullversion"}).trimmed();
}
// QRegularExpression versionPattern = QRegularExpression("^[\\d]+\\.[\\d]+.*$");
// if (auto m = versionPattern.match(version); !m.hasMatch()) {
// version = getCompilerOutput(binDir, c_prog, {"-dumpfullversion"}).trimmed();
// }
mVersion = QString(version).trimmed();

// Obtain compiler distro
Expand Down

0 comments on commit c0d0153

Please sign in to comment.