cmWorkerPool: Adopt MaybePrependCmdExe calls to reduce duplication
This commit is contained in:
parent
cf7ba6d43d
commit
104ca10208
@ -888,8 +888,6 @@ void cmQtAutoMocUicT::JobMocPredefsT::Process()
|
|||||||
// Check if response file is necessary
|
// Check if response file is necessary
|
||||||
MaybeWriteResponseFile(this->MocConst().PredefsFileAbs, cmd);
|
MaybeWriteResponseFile(this->MocConst().PredefsFileAbs, cmd);
|
||||||
|
|
||||||
cmSystemTools::MaybePrependCmdExe(cmd);
|
|
||||||
|
|
||||||
// Execute command
|
// Execute command
|
||||||
if (!this->RunProcess(GenT::MOC, result, cmd, reason.get())) {
|
if (!this->RunProcess(GenT::MOC, result, cmd, reason.get())) {
|
||||||
this->LogCommandError(GenT::MOC,
|
this->LogCommandError(GenT::MOC,
|
||||||
@ -2091,7 +2089,6 @@ void cmQtAutoMocUicT::JobCompileMocT::Process()
|
|||||||
cmd.push_back(sourceFile);
|
cmd.push_back(sourceFile);
|
||||||
|
|
||||||
MaybeWriteResponseFile(outputFile, cmd);
|
MaybeWriteResponseFile(outputFile, cmd);
|
||||||
cmSystemTools::MaybePrependCmdExe(cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute moc command
|
// Execute moc command
|
||||||
@ -2158,8 +2155,6 @@ void cmQtAutoMocUicT::JobCompileUicT::Process()
|
|||||||
cmd.emplace_back(outputFile);
|
cmd.emplace_back(outputFile);
|
||||||
cmd.emplace_back(sourceFile);
|
cmd.emplace_back(sourceFile);
|
||||||
|
|
||||||
cmSystemTools::MaybePrependCmdExe(cmd);
|
|
||||||
|
|
||||||
cmWorkerPool::ProcessResultT result;
|
cmWorkerPool::ProcessResultT result;
|
||||||
if (this->RunProcess(GenT::UIC, result, cmd, this->Reason.get())) {
|
if (this->RunProcess(GenT::UIC, result, cmd, this->Reason.get())) {
|
||||||
// Uic command success
|
// Uic command success
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "cmRange.h"
|
#include "cmRange.h"
|
||||||
#include "cmStringAlgorithms.h"
|
#include "cmStringAlgorithms.h"
|
||||||
|
#include "cmSystemTools.h"
|
||||||
#include "cmUVHandlePtr.h"
|
#include "cmUVHandlePtr.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,6 +192,7 @@ void cmUVReadOnlyProcess::setup(cmWorkerPool::ProcessResultT* result,
|
|||||||
std::vector<std::string> command,
|
std::vector<std::string> command,
|
||||||
std::string const& workingDirectory)
|
std::string const& workingDirectory)
|
||||||
{
|
{
|
||||||
|
cmSystemTools::MaybePrependCmdExe(command);
|
||||||
this->Setup_.WorkingDirectory = workingDirectory;
|
this->Setup_.WorkingDirectory = workingDirectory;
|
||||||
this->Setup_.Command = std::move(command);
|
this->Setup_.Command = std::move(command);
|
||||||
this->Setup_.Result = result;
|
this->Setup_.Result = result;
|
||||||
|
Loading…
Reference in New Issue
Block a user