forked from qt-creator/qt-creator
CMake: Handle STATIC types in CMakeCache.txt
Read STATIC types, but never write them out to the user. They are still useful for Creator-internal sanity checks. Change-Id: I8a13820291378de2370761be537f78fba1e45a0f Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Tobias Hunger
parent
12708d9b25
commit
42385146c7
@@ -207,7 +207,10 @@ QList<ConfigModel::DataItem> CMakeBuildConfiguration::completeCMakeConfiguration
|
||||
m_completeConfigurationCache = m_buildDirManager->parsedConfiguration();
|
||||
|
||||
CMakeConfig cache = Utils::filtered(m_completeConfigurationCache,
|
||||
[](const CMakeConfigItem &i) { return i.type != CMakeConfigItem::INTERNAL; });
|
||||
[](const CMakeConfigItem &i) {
|
||||
return i.type != CMakeConfigItem::INTERNAL
|
||||
&& i.type != CMakeConfigItem::STATIC;
|
||||
});
|
||||
return Utils::transform(cache, [](const CMakeConfigItem &i) {
|
||||
ConfigModel::DataItem j;
|
||||
j.key = QString::fromUtf8(i.key);
|
||||
|
||||
@@ -120,6 +120,8 @@ CMakeConfigItem CMakeConfigItem::fromString(const QString &s)
|
||||
t = CMakeConfigItem::BOOL;
|
||||
else if (type == QLatin1String("INTERNAL"))
|
||||
t = CMakeConfigItem::INTERNAL;
|
||||
else if (type == QLatin1String("STATIC"))
|
||||
t = CMakeConfigItem::STATIC;
|
||||
|
||||
item.key = key.toUtf8();
|
||||
item.type = t;
|
||||
@@ -130,7 +132,7 @@ CMakeConfigItem CMakeConfigItem::fromString(const QString &s)
|
||||
|
||||
QString CMakeConfigItem::toString() const
|
||||
{
|
||||
if (key.isEmpty())
|
||||
if (key.isEmpty() || type == CMakeProjectManager::CMakeConfigItem::STATIC)
|
||||
return QString();
|
||||
|
||||
QString typeStr;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CMakeProjectManager {
|
||||
|
||||
class CMakeConfigItem {
|
||||
public:
|
||||
enum Type { FILEPATH, PATH, BOOL, STRING, INTERNAL };
|
||||
enum Type { FILEPATH, PATH, BOOL, STRING, INTERNAL, STATIC };
|
||||
CMakeConfigItem();
|
||||
CMakeConfigItem(const CMakeConfigItem &other);
|
||||
CMakeConfigItem(const QByteArray &k, Type t, const QByteArray &d, const QByteArray &v);
|
||||
|
||||
Reference in New Issue
Block a user