forked from qt-creator/qt-creator
ProjectExplorer: Create BuildDirectory on device
The BuildDirectory is now assumed to be on the build device. The default build directory template path is resolved against the project path mapped to the build directory. Change-Id: Ie1d147d135e9e551f2ac46cbec583374d524d2d7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -701,7 +701,7 @@ void CMakeBuildSettingsWidget::updateConfigureDetailsWidgetsSummary(
|
||||
const FilePath buildDirectory = bc ? bc->buildDirectory() : ".";
|
||||
|
||||
cmd.addArgs({"-S", m_buildSystem->projectDirectory().path()});
|
||||
cmd.addArgs({"-B", cmd.executable().withNewMappedPath(buildDirectory).path()}); // FIXME: Just buildDirectory.path()
|
||||
cmd.addArgs({"-B", buildDirectory.path()});
|
||||
cmd.addArgs(configurationArguments);
|
||||
|
||||
params.setCommandLine(cmd);
|
||||
@@ -1138,7 +1138,7 @@ static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString buildT
|
||||
// Package manager auto setup
|
||||
if (Internal::CMakeSpecificSettings::instance()->packageManagerAutoSetup.value()) {
|
||||
cmd.addArg(QString("-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH="
|
||||
"%{buildDir}/%1/auto-setup.cmake")
|
||||
"%{BuildConfig:BuildDirectory:NativeFilePath}/%1/auto-setup.cmake")
|
||||
.arg(Constants::PACKAGE_MANAGER_DIR));
|
||||
}
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ CommandLine CMakeBuildStep::cmakeCommand() const
|
||||
if (buildConfiguration())
|
||||
buildDirectory = buildConfiguration()->buildDirectory();
|
||||
|
||||
cmd.addArgs({"--build", cmd.executable().withNewMappedPath(buildDirectory).path()});
|
||||
cmd.addArgs({"--build", buildDirectory.path()});
|
||||
|
||||
cmd.addArg("--target");
|
||||
cmd.addArgs(Utils::transform(m_buildTargets, [this](const QString &s) {
|
||||
|
||||
@@ -1303,7 +1303,7 @@ MakeInstallCommand CMakeBuildSystem::makeInstallCommand(const FilePath &installR
|
||||
buildDirectory = bc->buildDirectory();
|
||||
|
||||
cmd.command.addArg("--build");
|
||||
cmd.command.addArg(cmd.command.executable().withNewMappedPath(buildDirectory).path());
|
||||
cmd.command.addArg(buildDirectory.path());
|
||||
cmd.command.addArg("--target");
|
||||
cmd.command.addArg(installTarget);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ CommandLine CMakeInstallStep::cmakeCommand() const
|
||||
if (buildConfiguration())
|
||||
buildDirectory = buildConfiguration()->buildDirectory();
|
||||
|
||||
cmd.addArgs({"--install", cmd.executable().withNewMappedPath(buildDirectory).path()});
|
||||
cmd.addArgs({"--install", buildDirectory.path()});
|
||||
|
||||
auto bs = qobject_cast<CMakeBuildSystem *>(buildSystem());
|
||||
if (bs && bs->isMultiConfigReader()) {
|
||||
|
||||
@@ -68,7 +68,7 @@ void CMakeProcess::run(const BuildDirParameters ¶meters, const QStringList &
|
||||
}
|
||||
|
||||
const FilePath sourceDirectory = cmakeExecutable.withNewMappedPath(parameters.sourceDirectory);
|
||||
const FilePath buildDirectory = cmakeExecutable.withNewMappedPath(parameters.buildDirectory);
|
||||
const FilePath buildDirectory = parameters.buildDirectory;
|
||||
|
||||
if (!buildDirectory.exists()) {
|
||||
const QString msg = ::CMakeProjectManager::Tr::tr(
|
||||
|
||||
Reference in New Issue
Block a user