CMake: Bark when selected cmake binary and build dir on different hosts

Change-Id: I31d373cb6a87c65dbf42ae4e0b295d41f94d9f63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
hjk
2021-08-23 13:56:38 +02:00
parent bbe506d29b
commit e54c63af5e

View File

@@ -109,6 +109,13 @@ void CMakeProcess::run(const BuildDirParameters &parameters, const QStringList &
connect(process.get(), &QtcProcess::finished,
this, &CMakeProcess::handleProcessFinished);
if (buildDirectory.needsDevice()) {
if (cmake->cmakeExecutable().host() != buildDirectory.host()) {
m_parser.appendMessage(tr("CMake executable and build dir must be on the same device."), StdErrFormat);
reportCanceled();
return;
}
}
CommandLine commandLine(cmake->cmakeExecutable(), QStringList({"-S", srcDir, "-B", buildDirectory.path()}) + arguments);
TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);