CMake: Allow to unset configuration values

Change-Id: I649323e3c2cc51ea69dd7e216f30eeb653f3873b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-09-27 12:28:11 +02:00
parent aeb45f5cbe
commit b1157e4e63
7 changed files with 76 additions and 26 deletions

View File

@@ -207,6 +207,7 @@ void CMakeBuildConfiguration::setConfigurationForCMake(const QList<ConfigModel::
ni.value = i.value.toUtf8();
ni.documentation = i.description.toUtf8();
ni.isAdvanced = i.isAdvanced;
ni.isUnset = i.isUnset;
ni.inCMakeCache = i.inCMakeCache;
ni.values = i.values;
switch (i.type) {
@@ -274,7 +275,7 @@ void CMakeBuildConfiguration::setConfigurationForCMake(const CMakeConfig &config
bool hasKitOverride = false;
foreach (const CMakeConfigItem &i, m_configurationForCMake) {
const QString b = CMakeConfigItem::expandedValueOf(k, i.key, kitConfig);
if (!b.isNull() && i.expandedValue(k) != b) {
if (!b.isNull() && (i.expandedValue(k) != b || i.isUnset)) {
hasKitOverride = true;
break;
}