From 104ca10208401c37fbf6002d937f89d201a80f41 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 31 Jan 2025 11:49:21 -0500 Subject: cmWorkerPool: Adopt MaybePrependCmdExe calls to reduce duplication --- Source/cmQtAutoMocUic.cxx | 5 ----- Source/cmWorkerPool.cxx | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 9ba48cc..653dc86 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -888,8 +888,6 @@ void cmQtAutoMocUicT::JobMocPredefsT::Process() // Check if response file is necessary MaybeWriteResponseFile(this->MocConst().PredefsFileAbs, cmd); - cmSystemTools::MaybePrependCmdExe(cmd); - // Execute command if (!this->RunProcess(GenT::MOC, result, cmd, reason.get())) { this->LogCommandError(GenT::MOC, @@ -2091,7 +2089,6 @@ void cmQtAutoMocUicT::JobCompileMocT::Process() cmd.push_back(sourceFile); MaybeWriteResponseFile(outputFile, cmd); - cmSystemTools::MaybePrependCmdExe(cmd); } // Execute moc command @@ -2158,8 +2155,6 @@ void cmQtAutoMocUicT::JobCompileUicT::Process() cmd.emplace_back(outputFile); cmd.emplace_back(sourceFile); - cmSystemTools::MaybePrependCmdExe(cmd); - cmWorkerPool::ProcessResultT result; if (this->RunProcess(GenT::UIC, result, cmd, this->Reason.get())) { // Uic command success diff --git a/Source/cmWorkerPool.cxx b/Source/cmWorkerPool.cxx index c057ed1..4a04e33 100644 --- a/Source/cmWorkerPool.cxx +++ b/Source/cmWorkerPool.cxx @@ -17,6 +17,7 @@ #include "cmRange.h" #include "cmStringAlgorithms.h" +#include "cmSystemTools.h" #include "cmUVHandlePtr.h" /** @@ -191,6 +192,7 @@ void cmUVReadOnlyProcess::setup(cmWorkerPool::ProcessResultT* result, std::vector command, std::string const& workingDirectory) { + cmSystemTools::MaybePrependCmdExe(command); this->Setup_.WorkingDirectory = workingDirectory; this->Setup_.Command = std::move(command); this->Setup_.Result = result; -- cgit v0.12