Commit 78d603ad authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Use the make command defined by the tool chain

For now only for GenericProject, since the CMakeProject doesn't have the
right tool chain set on Windows yet.

Reviewed-by: dt
parent 3904b2ad
......@@ -233,7 +233,7 @@ QString CMakeProject::buildParser(const QString &buildConfiguration) const
QStringList CMakeProject::targets() const
{
QStringList results;
foreach(const CMakeTarget &ct, m_targets)
foreach (const CMakeTarget &ct, m_targets)
results << ct.title;
return results;
}
......
......@@ -44,7 +44,7 @@
#include <QtCore/QXmlStreamReader>
namespace CMakeProjectManager {
namespace Internal{
namespace Internal {
class CMakeFile;
......
......@@ -32,6 +32,7 @@
#include "genericproject.h"
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/toolchain.h>
#include <utils/qtcassert.h>
#include <QtGui/QFormLayout>
......@@ -97,11 +98,10 @@ bool GenericMakeStep::init(const QString &buildConfiguration)
setEnabled(buildConfiguration, true);
setWorkingDirectory(buildConfiguration, m_pro->buildDirectory(buildConfiguration));
#ifdef Q_OS_WIN
setCommand(buildConfiguration, "mingw32-make");
#else // Q_OS_WIN
setCommand(buildConfiguration, "make"); // TODO give full path here?
#endif // Q_OS_WIN
if (ProjectExplorer::ToolChain *toolChain = m_pro->toolChain())
setCommand(buildConfiguration, toolChain->makeCommand());
else
setCommand(buildConfiguration, "make");
setArguments(buildConfiguration, value(buildConfiguration, "buildTargets").toStringList()); // TODO
setEnvironment(buildConfiguration, m_pro->environment(buildConfiguration));
return AbstractProcessStep::init(buildConfiguration);
......
......@@ -55,6 +55,10 @@ using namespace GenericProjectManager::Internal;
namespace {
/**
* An editable string list model. New strings can be added by editing the entry
* called "<new>", displayed at the end.
*/
class ListModel: public QStringListModel
{
public:
......@@ -320,6 +324,11 @@ QString GenericProject::buildParser(const QString &buildConfiguration) const
return QString();
}
ProjectExplorer::ToolChain *GenericProject::toolChain() const
{
return m_toolChain;
}
QString GenericProject::toolChainId() const
{ return m_toolChainId; }
......
......@@ -50,6 +50,10 @@ class PathChooser;
}
}
namespace ProjectExplorer {
class ToolChain;
}
namespace GenericProjectManager {
namespace Internal {
......@@ -89,8 +93,7 @@ public:
QStringList targets() const;
GenericMakeStep *makeStep() const;
QString buildParser(const QString &buildConfiguration) const;
QStringList convertToAbsoluteFiles(const QStringList &paths) const;
ProjectExplorer::ToolChain *toolChain() const;
QStringList includePaths() const;
void setIncludePaths(const QStringList &includePaths);
......@@ -112,6 +115,7 @@ protected:
private:
void parseProject();
QStringList convertToAbsoluteFiles(const QStringList &paths) const;
QStringList readLines(const QString &absoluteFileName) 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