CMake: Keep cmake state in a temporary directory till first build

This avoids creating lots of build directories as the user types
in something into the builddirectory line of the build settings.

Change-Id: Ib08a0f65e08bce104e4baf9e19fb01730d2f5f08
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-02-25 14:18:05 +01:00
parent 76a050cb83
commit 420e54281c
6 changed files with 129 additions and 26 deletions

View File

@@ -69,6 +69,7 @@ public:
const ProjectExplorer::Kit *kit() const;
const Utils::FileName buildDirectory() const;
const Utils::FileName workDirectory() const;
const Utils::FileName sourceDirectory() const;
const CMakeConfig cmakeConfiguration() const;
bool isParsing() const;
@@ -76,6 +77,7 @@ public:
void parse();
void forceReparse();
void resetData();
bool persistCMakeState();
bool isProjectFile(const Utils::FileName &fileName) const;
QString projectName() const;
@@ -91,6 +93,7 @@ signals:
private:
void stopProcess();
void cleanUpProcess();
void extractData();
void startCMake(CMakeTool *tool, const QString &generator, const CMakeConfig &config);
@@ -105,6 +108,7 @@ private:
const CMakeBuildConfiguration *m_buildConfiguration = nullptr;
Utils::QtcProcess *m_cmakeProcess = nullptr;
QTemporaryDir *m_tempDir = nullptr;
QSet<Utils::FileName> m_watchedFiles;
QString m_projectName;