Преглед на файлове

cmWorkerPool: Adopt MaybePrependCmdExe calls to reduce duplication

Brad King преди 10 месеца
родител
ревизия
104ca10208
променени са 2 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. 0 5
      Source/cmQtAutoMocUic.cxx
  2. 2 0
      Source/cmWorkerPool.cxx

+ 0 - 5
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

+ 2 - 0
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<std::string> command,
                                 std::string const& workingDirectory)
 {
+  cmSystemTools::MaybePrependCmdExe(command);
   this->Setup_.WorkingDirectory = workingDirectory;
   this->Setup_.Command = std::move(command);
   this->Setup_.Result = result;