aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/qbs-setup-toolchains/probe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/qbs-setup-toolchains/probe.cpp')
-rw-r--r--src/app/qbs-setup-toolchains/probe.cpp65
1 files changed, 1 insertions, 64 deletions
diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp
index df617da23..625eeddd9 100644
--- a/src/app/qbs-setup-toolchains/probe.cpp
+++ b/src/app/qbs-setup-toolchains/probe.cpp
@@ -39,6 +39,7 @@
#include "probe.h"
#include "clangclprobe.h"
+#include "iarewprobe.h"
#include "msvcprobe.h"
#include "sdccprobe.h"
#include "xcodeprobe.h"
@@ -109,18 +110,6 @@ static QStringList validMinGWMachines()
QStringLiteral("i586-mingw32msvc"), QStringLiteral("amd64-mingw32msvc")};
}
-static QStringList knownIarCompilerNames()
-{
- return {QStringLiteral("icc8051"), QStringLiteral("iccarm"), QStringLiteral("iccavr")};
-}
-
-static bool isIarCompiler(const QString &compilerName)
-{
- return Internal::any_of(knownIarCompilerNames(), [compilerName](const QString &knownName) {
- return compilerName.contains(knownName);
- });
-}
-
static QStringList knownKeilCompilerNames()
{
return {QStringLiteral("c51"), QStringLiteral("armcc")};
@@ -270,39 +259,6 @@ static Profile createGccProfile(const QString &compilerFilePath, Settings *setti
return profile;
}
-static QString guessIarArchitecture(const QFileInfo &compiler)
-{
- const auto baseName = compiler.baseName();
- if (baseName == QLatin1String("icc8051"))
- return QStringLiteral("mcs51");
- if (baseName == QLatin1String("iccarm"))
- return QStringLiteral("arm");
- if (baseName == QLatin1String("iccavr"))
- return QStringLiteral("avr");
- return {};
-}
-
-static Profile createIarProfile(const QFileInfo &compiler, Settings *settings,
- QString profileName = QString())
-{
- const QString architecture = guessIarArchitecture(compiler);
-
- // In case the profile is auto-detected.
- if (profileName.isEmpty())
- profileName = QLatin1String("iar-") + architecture;
-
- Profile profile(profileName, settings);
- profile.setValue(QLatin1String("cpp.toolchainInstallPath"), compiler.absolutePath());
- profile.setValue(QLatin1String("qbs.toolchainType"), QLatin1String("iar"));
- if (!architecture.isEmpty())
- profile.setValue(QLatin1String("qbs.architecture"), architecture);
-
- qStdout << Tr::tr("Profile '%1' created for '%2'.").arg(
- profile.name(), compiler.absoluteFilePath())
- << endl;
- return profile;
-}
-
static QString guessKeilArchitecture(const QFileInfo &compiler)
{
const auto baseName = compiler.baseName();
@@ -372,25 +328,6 @@ static void mingwProbe(Settings *settings, QList<Profile> &profiles)
}
}
-static void iarProbe(Settings *settings, QList<Profile> &profiles)
-{
- qStdout << Tr::tr("Trying to detect IAR toolchains...") << endl;
-
- bool isFound = false;
- const auto compilerNames = knownIarCompilerNames();
- for (const QString &compilerName : compilerNames) {
- const QString iarPath = findExecutable(HostOsInfo::appendExecutableSuffix(compilerName));
- if (!iarPath.isEmpty()) {
- const auto profile = createIarProfile(iarPath, settings);
- profiles.push_back(profile);
- isFound = true;
- }
- }
-
- if (!isFound)
- qStdout << Tr::tr("No IAR toolchains found.") << endl;
-}
-
static void keilProbe(Settings *settings, QList<Profile> &profiles)
{
qStdout << Tr::tr("Trying to detect KEIL toolchains...") << endl;