forked from qt-creator/qt-creator
CMake: Use FilePath::mapToDevicePath for construction cmake line
Change-Id: I178803f39b5fa7707c1e4338ff02b9de18b22858 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -92,10 +92,8 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList &
|
||||
}
|
||||
}
|
||||
|
||||
const QString srcDir = parameters.sourceDirectory.path();
|
||||
|
||||
const auto parser = new CMakeParser;
|
||||
parser->setSourceDirectory(srcDir);
|
||||
parser->setSourceDirectory(parameters.sourceDirectory.path());
|
||||
m_parser.addLineParser(parser);
|
||||
|
||||
// Always use the sourceDir: If we are triggered because the build directory is getting deleted
|
||||
@@ -121,7 +119,13 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList &
|
||||
connect(process.get(), &QtcProcess::finished,
|
||||
this, &CMakeProcess::handleProcessFinished);
|
||||
|
||||
CommandLine commandLine(cmake->cmakeExecutable(), QStringList({"-S", srcDir, "-B", buildDirectory.path()}) + arguments);
|
||||
const FilePath cmakeExecutable = cmake->cmakeExecutable();
|
||||
const FilePath sourceDirectory = parameters.sourceDirectory.onDevice(cmakeExecutable);
|
||||
|
||||
CommandLine commandLine(cmakeExecutable);
|
||||
commandLine.addArgs({"-S", sourceDirectory.mapToDevicePath(),
|
||||
"-B", buildDirectory.mapToDevicePath()});
|
||||
commandLine.addArgs(arguments);
|
||||
|
||||
TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
|
||||
|
||||
|
Reference in New Issue
Block a user