CMake: Use correct device environment for remote cmake binaries

Change-Id: Id2fccab7f2d051406b0f2b0bbf3c118198f6ed32
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-09-30 18:13:32 +02:00
parent 3b84a408df
commit 09fb8d403b

View File

@@ -173,13 +173,14 @@ bool CMakeTool::isValid() const
void CMakeTool::runCMake(QtcProcess &cmake, const QStringList &args, int timeoutS) const void CMakeTool::runCMake(QtcProcess &cmake, const QStringList &args, int timeoutS) const
{ {
const FilePath executable = cmakeExecutable();
cmake.setTimeoutS(timeoutS); cmake.setTimeoutS(timeoutS);
cmake.setDisableUnixTerminal(); cmake.setDisableUnixTerminal();
Environment env = Environment::systemEnvironment(); Environment env = executable.deviceEnvironment();
env.setupEnglishOutput(); env.setupEnglishOutput();
cmake.setEnvironment(env); cmake.setEnvironment(env);
cmake.setTimeOutMessageBoxEnabled(false); cmake.setTimeOutMessageBoxEnabled(false);
cmake.setCommand({cmakeExecutable(), args}); cmake.setCommand({executable, args});
cmake.runBlocking(); cmake.runBlocking();
} }