forked from qt-creator/qt-creator
Add explicit support to use jom instead of nmake (which does not support -j)
jom can be found at http://qt.gitorious.org/qt-labs/jom Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
@@ -652,6 +652,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
m_projectExplorerSettings.buildBeforeRun = s->value("ProjectExplorer/Settings/BuildBeforeRun", true).toBool();
|
||||
m_projectExplorerSettings.saveBeforeBuild = s->value("ProjectExplorer/Settings/SaveBeforeBuild", false).toBool();
|
||||
m_projectExplorerSettings.showCompilerOutput = s->value("ProjectExplorer/Settings/ShowCompilerOutput", false).toBool();
|
||||
m_projectExplorerSettings.useJom = s->value("ProjectExplorer/Settings/UseJom", true).toBool();
|
||||
}
|
||||
|
||||
connect(m_sessionManagerAction, SIGNAL(triggered()), this, SLOT(showSessionManager()));
|
||||
@@ -892,6 +893,7 @@ void ProjectExplorerPlugin::savePersistentSettings()
|
||||
s->setValue("ProjectExplorer/Settings/BuildBeforeRun", m_projectExplorerSettings.buildBeforeRun);
|
||||
s->setValue("ProjectExplorer/Settings/SaveBeforeBuild", m_projectExplorerSettings.saveBeforeBuild);
|
||||
s->setValue("ProjectExplorer/Settings/ShowCompilerOutput", m_projectExplorerSettings.showCompilerOutput);
|
||||
s->setValue("ProjectExplorer/Settings/UseJom", m_projectExplorerSettings.useJom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ struct ProjectExplorerSettings
|
||||
bool buildBeforeRun;
|
||||
bool saveBeforeBuild;
|
||||
bool showCompilerOutput;
|
||||
bool useJom;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -73,6 +73,11 @@ QWidget *ProjectExplorerSettingsPage::createPage(QWidget *parent)
|
||||
m_ui.buildProjectBeforeRunCheckBox->setChecked(pes.buildBeforeRun);
|
||||
m_ui.saveAllFilesCheckBox->setChecked(pes.saveBeforeBuild);
|
||||
m_ui.showCompileOutputCheckBox->setChecked(pes.showCompilerOutput);
|
||||
#ifdef Q_OS_WIN
|
||||
m_ui.jomCheckbox->setChecked(pes.useJom);
|
||||
#else
|
||||
m_ui.jomCheckbox->setVisible(false);
|
||||
#endif
|
||||
return w;
|
||||
}
|
||||
|
||||
@@ -82,6 +87,9 @@ void ProjectExplorerSettingsPage::apply()
|
||||
pes.buildBeforeRun = m_ui.buildProjectBeforeRunCheckBox->isChecked();
|
||||
pes.saveBeforeBuild = m_ui.saveAllFilesCheckBox->isChecked();
|
||||
pes.showCompilerOutput = m_ui.showCompileOutputCheckBox->isChecked();
|
||||
#ifdef Q_OS_WIN
|
||||
pes.useJom = m_ui.jomCheckbox->isChecked();
|
||||
#endif
|
||||
ProjectExplorerPlugin::instance()->setProjectExplorerSettings(pes);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>296</width>
|
||||
<height>152</height>
|
||||
<height>249</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@@ -38,6 +38,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="jomCheckbox">
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use jom instead of nmake</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -374,6 +374,14 @@ void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
||||
|
||||
QString MSVCToolChain::makeCommand() const
|
||||
{
|
||||
if (ProjectExplorerPlugin::instance()->projectExplorerSettings().useJom) {
|
||||
// We want jom! Try to find it.
|
||||
QString jom = QCoreApplication::applicationDirPath() + QLatin1String("/jom.exe");
|
||||
if (QFileInfo(jom).exists())
|
||||
return jom;
|
||||
else
|
||||
return "jom.exe";
|
||||
}
|
||||
return "nmake.exe";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user