summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2016-04-08 14:14:03 +0200
committerTobias Hunger <tobias.hunger@qt.io>2016-04-19 11:05:56 +0000
commit42385146c78de5019493afa27b1dacef12b08fe0 (patch)
treee447c663dc6984db9878b08b3b9a6c97c5faa280 /src/plugins/cmakeprojectmanager
parent12708d9b25929d379735c490b73758305ddb76a4 (diff)
downloadqt-creator-42385146c78de5019493afa27b1dacef12b08fe0.tar.gz
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp5
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index 57f8c36303..1d133d8d60 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -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);
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
index 7f4af54338..3a578c6cac 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
@@ -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;
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
index 2562b92479..b11e83b7bb 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h
@@ -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);