Merge remote-tracking branch 'origin/7.0'

Change-Id: I95dba3037fe5630cafc3c1e45c579ff18730262c
This commit is contained in:
Eike Ziller
2022-04-04 09:10:47 +02:00
25 changed files with 377 additions and 166 deletions

View File

@@ -1101,7 +1101,7 @@ static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString buildT
if (!isIos(k)) { // iOS handles this differently
const QString sysRoot = SysRootKitAspect::sysRoot(k).path();
if (!sysRoot.isEmpty()) {
cmd.addArg("-DCMAKE_SYSROOT:PATH" + sysRoot);
cmd.addArg("-DCMAKE_SYSROOT:PATH=" + sysRoot);
if (ToolChain *tc = ToolChainKitAspect::cxxToolChain(k)) {
const QString targetTriple = tc->originalTargetTriple();
cmd.addArg("-DCMAKE_C_COMPILER_TARGET:STRING=" + targetTriple);

View File

@@ -514,7 +514,7 @@ void CMakeBuildSystem::combineScanAndParse(bool restoredFromBackup)
if (restoredFromBackup)
project()->addIssue(
CMakeProject::IssueType::Error,
CMakeProject::IssueType::Warning,
tr("<b>CMake configuration failed<b>"
"<p>The backup of the previous configuration has been restored.</p>"
"<p>Issues and \"Projects > Build\" settings "
@@ -532,7 +532,7 @@ void CMakeBuildSystem::combineScanAndParse(bool restoredFromBackup)
updateFallbackProjectData();
project()->addIssue(
CMakeProject::IssueType::Error,
CMakeProject::IssueType::Warning,
tr("<b>Failed to load project<b>"
"<p>Issues and \"Projects > Build\" settings "
"show more information about the failure.</p"));

View File

@@ -349,7 +349,8 @@ CMakeConfig CMakeConfig::fromArguments(const QStringList &list, QStringList &unk
unknownOptions.append(i);
}
return result;
return Utils::filtered(result, [](const CMakeConfigItem &item) { return !item.key.isEmpty(); });
}
CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *errorMessage)