CMake: Trigger cmake run *before* build when files changed

Make sure to run cmake *before* cmake --build when cmake files just
got saved. This helps e.g. when editing CMakeLists.txt files and the
hitting "Built" and "Save all" (or "Always save before build").

Task-number: QTCREATORBUG-16187
Change-Id: I16b1d02eb342a447003380946ce7a9d785476a0e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tobias Hunger
2016-10-06 15:55:55 +02:00
parent 4d7420fe49
commit b17c98ad6f
5 changed files with 42 additions and 6 deletions

View File

@@ -76,6 +76,7 @@ public:
void maybeForceReparse();
void resetData();
bool persistCMakeState();
bool updateCMakeStateBeforeBuild();
void runCMake();
void clearCache();
@@ -111,7 +112,7 @@ private:
mutable QList<CMakeConfigItem> m_completeConfigurationCache;
BuildDirManager *m_buildDirManager = nullptr;
BuildDirManager *const m_buildDirManager = nullptr;
friend class CMakeBuildSettingsWidget;
friend class CMakeProjectManager::CMakeProject;