Esempio n. 1
0
bool MakeStep::init()
{
    CMakeBuildConfiguration *bc = cmakeBuildConfiguration();

    QString arguments = Utils::QtcProcess::joinArgs(m_buildTargets);
    Utils::QtcProcess::addArgs(&arguments, additionalArguments());

    setIgnoreReturnValue(m_clean);

    ProcessParameters *pp = processParameters();
    pp->setMacroExpander(bc->macroExpander());
    pp->setEnvironment(bc->environment());
    pp->setWorkingDirectory(bc->buildDirectory());
    if (bc->toolChain())
        pp->setCommand(bc->toolChain()->makeCommand());
    else
        pp->setCommand(QLatin1String("make"));
    pp->setArguments(arguments);

    setOutputParser(new ProjectExplorer::GnuMakeParser());
    if (bc->toolChain())
        appendOutputParser(bc->toolChain()->outputParser());
    outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());

    return AbstractProcessStep::init();
}
Esempio n. 2
0
void MakeStepConfigWidget::updateDetails()
{
    CMakeBuildConfiguration *bc = m_makeStep->cmakeBuildConfiguration();
    ProjectExplorer::ToolChain *tc = bc->toolChain();
    if (tc) {
        QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);
        Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());

        ProcessParameters param;
        param.setMacroExpander(bc->macroExpander());
        param.setEnvironment(bc->environment());
        param.setWorkingDirectory(bc->buildDirectory());
        param.setCommand(tc->makeCommand());
        param.setArguments(arguments);
        m_summaryText = param.summary(displayName());
    } else {
        m_summaryText = tr("<b>Unknown tool chain</b>");
    }
    emit updateSummary();
}