CMake: Put source directory last when running cmake

Tealeaf reader using CMake version 3.5.2 fails to configure any
project now that creator passes "-C something". It wrongly assumes
the provided "something" is the actual source directory.

Change-Id: I3d74cc81a18255b669ab3f9f892472c2ac5d304f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tobias Hunger
2019-10-18 16:19:08 +02:00
parent 97855766bd
commit 23e79ba60f

View File

@@ -128,9 +128,10 @@ void CMakeProcess::run(const BuildDirParameters &parameters, const QStringList &
connect(process.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &CMakeProcess::handleProcessFinished);
QStringList args(srcDir);
QStringList args;
args += parameters.generatorArguments;
args += arguments;
args += srcDir;
Utils::CommandLine commandLine(cmake->cmakeExecutable(), args);
TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);