Commit 531fba61 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/4.3'

Change-Id: Ie18d823d0940113e8a78c81204b7a7ca07a060ba
parents 73f2c0f4 b6bf1fdf
......@@ -38,12 +38,17 @@
To view all settings, select the \uicontrol Advanced check box.
To add build settings, select \uicontrol Add, and then select the type of
the setting that you are adding: \uicontrol Boolean, \uicontrol String,
\uicontrol Directory, or \uicontrol File.
To modify the value of a build setting, select it, and then select
\uicontrol Edit. The new value is displayed in italics until you save the
changes by selecting \uicontrol {Apply Configuration Changes}. Any
configuration change might trigger a follow-up configuration change, so keep
saving until no more values are displayed in italics.
To reset the changes that you made, select \uicontrol Reset.
//! [cmake build configuration]
......
......@@ -250,9 +250,10 @@ QList<void *> CMakeProjectImporter::examineDirectory(const Utils::FileName &impo
}
const auto homeDir
= Utils::FileName::fromUserInput(QString::fromUtf8(CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", config)));
if (homeDir != projectDirectory()) {
const Utils::FileName canonicalProjectDirectory = Utils::FileUtils::canonicalPath(projectDirectory());
if (homeDir != canonicalProjectDirectory) {
qCDebug(cmInputLog()) << "Wrong source directory:" << homeDir.toUserOutput()
<< "expected:" << projectDirectory().toUserOutput();
<< "expected:" << canonicalProjectDirectory.toUserOutput();
return { };
}
......
......@@ -464,7 +464,7 @@ void ServerMode::handleHello(const QVariantMap &data)
if (m_minorProtocol >= 0)
version.insert("minor", m_minorProtocol);
extra.insert("protocolVersion", version);
extra.insert("sourceDirectory", m_sourceDirectory.toString());
extra.insert("sourceDirectory", m_sourceDirectory.toFileInfo().canonicalFilePath());
extra.insert("buildDirectory", m_buildDirectory.toString());
extra.insert("generator", m_generator);
if (!m_platform.isEmpty())
......
......@@ -195,6 +195,8 @@ void FlatModel::addOrRebuildProjectModel(Project *project)
container->appendChild(new WrapperNode(projectFileNode));
}
container->sortChildren(&sortWrapperNodes);
container->forAllChildren([this](WrapperNode *node) {
if (node->m_node) {
const QString path = node->m_node->filePath().toString();
......
......@@ -548,6 +548,8 @@ public:
dir);
FileName path = FileName::fromString(importDir);
Target *lastTarget = nullptr;
BuildConfiguration *lastBc = nullptr;
const QList<BuildInfo *> toImport = projectImporter->import(path, false);
for (BuildInfo *info : toImport) {
Target *target = project->target(info->kitId);
......@@ -561,8 +563,16 @@ public:
BuildConfiguration *bc = info->factory()->create(target, info);
QTC_ASSERT(bc, continue);
target->addBuildConfiguration(bc);
lastTarget = target;
lastBc = bc;
}
}
if (lastTarget && lastBc) {
SessionManager::setActiveBuildConfiguration(lastTarget, lastBc, SetActive::Cascade);
SessionManager::setActiveTarget(project, lastTarget, SetActive::Cascade);
}
qDeleteAll(toImport);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment