Commit 0a5d41cb authored by Daniel Teske's avatar Daniel Teske
Browse files

Move findInstalledJom to a more suitable place



Jom does not replace mingw32-make but nmake

Change-Id: Id9849cfb7313f08f7dc1ca9b67997b6589e7942b
Reviewed-by: default avatarOliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 18dfe87e
......@@ -258,6 +258,23 @@ bool AbstractMsvcToolChain::generateEnvironmentSettings(Utils::Environment &env,
return true;
}
QString AbstractMsvcToolChain::findInstalledJom()
{
if (Abi::hostAbi().os() != Abi::WindowsOS) {
qWarning() << "Jom can only be used on Windows";
return QString();
}
// We want jom! Try to find it.
const QString jom = QLatin1String("jom.exe");
const QFileInfo installedJom = QFileInfo(QCoreApplication::applicationDirPath()
+ QLatin1Char('/') + jom);
if (installedJom.isFile() && installedJom.isExecutable())
return installedJom.absoluteFilePath();
else
return jom;
}
} // namespace Internal
} // namespace ProjectExplorer
......@@ -64,6 +64,7 @@ public:
bool canClone() const;
QString varsBat() const { return m_vcvarsBat; }
static QString findInstalledJom();
protected:
virtual Utils::Environment readEnvironmentSetting(Utils::Environment& env) const = 0;
virtual QByteArray msvcPredefinedMacros(const Utils::Environment& env) const;
......
......@@ -874,23 +874,6 @@ QString MingwToolChain::makeCommand() const
return QLatin1String("mingw32-make.exe");
}
QString MingwToolChain::findInstalledJom()
{
if (Abi::hostAbi().os() != Abi::WindowsOS) {
qWarning() << "Jom can only be used on Windows";
return QString();
}
// We want jom! Try to find it.
const QString jom = QLatin1String("jom.exe");
const QFileInfo installedJom = QFileInfo(QCoreApplication::applicationDirPath()
+ QLatin1Char('/') + jom);
if (installedJom.isFile() && installedJom.isExecutable())
return installedJom.absoluteFilePath();
else
return jom;
}
ToolChain *MingwToolChain::clone() const
{
return new MingwToolChain(*this);
......
......@@ -145,7 +145,6 @@ public:
QString typeName() const;
Utils::FileName mkspec() const;
QString makeCommand() const;
static QString findInstalledJom();
ToolChain *clone() const;
......
Markdown is supported
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