diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index 41d49f93494..84a31135790 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -190,6 +190,7 @@ bool AbstractProcessStep::setupProcess(Process &process) // For example Clang uses PWD for paths in debug info, see QTCREATORBUG-23788 Environment envWithPwd = d->m_param.environment(); envWithPwd.set("PWD", workingDir.path()); + process.setProcessMode(d->m_param.processMode()); process.setEnvironment(envWithPwd); process.setCommand({d->m_param.effectiveCommand(), d->m_param.effectiveArguments(), CommandLine::Raw}); diff --git a/src/plugins/projectexplorer/processparameters.h b/src/plugins/projectexplorer/processparameters.h index ce418b65c28..708fc10bd33 100644 --- a/src/plugins/projectexplorer/processparameters.h +++ b/src/plugins/projectexplorer/processparameters.h @@ -6,6 +6,7 @@ #include "projectexplorer_export.h" #include +#include namespace Utils { class MacroExpander; @@ -31,6 +32,9 @@ public: void setMacroExpander(Utils::MacroExpander *mx) { m_macroExpander = mx; } Utils::MacroExpander *macroExpander() const { return m_macroExpander; } + void setProcessMode(Utils::ProcessMode mode) { m_processMode = mode; } + Utils::ProcessMode processMode() const { return m_processMode; } + /// Get the fully expanded working directory: Utils::FilePath effectiveWorkingDirectory() const; /// Get the fully expanded command name to run: @@ -54,6 +58,7 @@ private: mutable Utils::FilePath m_effectiveCommand; mutable QString m_effectiveArguments; mutable bool m_commandMissing = false; + mutable Utils::ProcessMode m_processMode = Utils::ProcessMode::Reader; }; } // namespace ProjectExplorer