forked from qt-creator/qt-creator
CMake: More logging of parsing starting/stopped
Change-Id: I52dad9260c21e03add513f7229148635ae76236a Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -338,6 +338,7 @@ bool BuildDirManager::persistCMakeState()
|
|||||||
|
|
||||||
BuildDirParameters newParameters = m_parameters;
|
BuildDirParameters newParameters = m_parameters;
|
||||||
newParameters.workDirectory.clear();
|
newParameters.workDirectory.clear();
|
||||||
|
qCDebug(cmakeBuildDirManagerLog) << "Requesting parse due to persisting CMake State";
|
||||||
setParametersAndRequestParse(newParameters,
|
setParametersAndRequestParse(newParameters,
|
||||||
REPARSE_URGENT | REPARSE_FORCE_CMAKE_RUN
|
REPARSE_URGENT | REPARSE_FORCE_CMAKE_RUN
|
||||||
| REPARSE_FORCE_CONFIGURATION | REPARSE_CHECK_CONFIGURATION);
|
| REPARSE_FORCE_CONFIGURATION | REPARSE_CHECK_CONFIGURATION);
|
||||||
|
@@ -129,6 +129,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
return; // not for us...
|
return; // not for us...
|
||||||
// Build configuration has not changed, but Kit settings might have:
|
// Build configuration has not changed, but Kit settings might have:
|
||||||
// reparse and check the configuration, independent of whether the reader has changed
|
// reparse and check the configuration, independent of whether the reader has changed
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to kit being updated";
|
||||||
m_buildDirManager.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
m_buildDirManager.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
});
|
});
|
||||||
@@ -139,6 +140,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
// Build configuration has switched:
|
// Build configuration has switched:
|
||||||
// * Check configuration if reader changes due to it not existing yet:-)
|
// * Check configuration if reader changes due to it not existing yet:-)
|
||||||
// * run cmake without configuration arguments if the reader stays
|
// * run cmake without configuration arguments if the reader stays
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to active target changed";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
@@ -152,6 +154,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
// Build configuration has switched:
|
// Build configuration has switched:
|
||||||
// * Check configuration if reader changes due to it not existing yet:-)
|
// * Check configuration if reader changes due to it not existing yet:-)
|
||||||
// * run cmake without configuration arguments if the reader stays
|
// * run cmake without configuration arguments if the reader stays
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to active BC changed";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
@@ -167,6 +170,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
// The environment on our BC has changed:
|
// The environment on our BC has changed:
|
||||||
// * Error out if the reader updates, cannot happen since all BCs share a target/kit.
|
// * Error out if the reader updates, cannot happen since all BCs share a target/kit.
|
||||||
// * run cmake without configuration arguments if the reader stays
|
// * run cmake without configuration arguments if the reader stays
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to environment change";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
@@ -179,6 +183,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
// * run cmake without configuration arguments if the reader stays
|
// * run cmake without configuration arguments if the reader stays
|
||||||
// If no configuration exists, then the arguments will get added automatically by
|
// If no configuration exists, then the arguments will get added automatically by
|
||||||
// the reader.
|
// the reader.
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to build directory change";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
@@ -189,6 +194,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
// The CMake configuration has changed on our BC:
|
// The CMake configuration has changed on our BC:
|
||||||
// * Error out if the reader updates, cannot happen since all BCs share a target/kit.
|
// * Error out if the reader updates, cannot happen since all BCs share a target/kit.
|
||||||
// * run cmake with configuration arguments if the reader stays
|
// * run cmake with configuration arguments if the reader stays
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to cmake configuration change";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_FORCE_CONFIGURATION);
|
BuildDirManager::REPARSE_FORCE_CONFIGURATION);
|
||||||
@@ -197,12 +203,14 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
|||||||
|
|
||||||
connect(project(), &Project::projectFileIsDirty, this, [this]() {
|
connect(project(), &Project::projectFileIsDirty, this, [this]() {
|
||||||
if (m_buildConfiguration->isActive()) {
|
if (m_buildConfiguration->isActive()) {
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
|
||||||
m_buildDirManager
|
m_buildDirManager
|
||||||
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_DEFAULT);
|
BuildDirManager::REPARSE_DEFAULT);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to initial CMake BuildSystem setup";
|
||||||
m_buildDirManager.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
m_buildDirManager.setParametersAndRequestParse(BuildDirParameters(m_buildConfiguration),
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
|
||||||
}
|
}
|
||||||
@@ -221,8 +229,11 @@ CMakeBuildSystem::~CMakeBuildSystem()
|
|||||||
|
|
||||||
void CMakeBuildSystem::triggerParsing()
|
void CMakeBuildSystem::triggerParsing()
|
||||||
{
|
{
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Parsing has been triggered";
|
||||||
m_currentGuard = guardParsingRun();
|
m_currentGuard = guardParsingRun();
|
||||||
|
|
||||||
|
QTC_CHECK(m_currentGuard.guardsProject());
|
||||||
|
|
||||||
if (m_allFiles.isEmpty())
|
if (m_allFiles.isEmpty())
|
||||||
m_buildDirManager.requestFilesystemScan();
|
m_buildDirManager.requestFilesystemScan();
|
||||||
|
|
||||||
@@ -279,6 +290,7 @@ QStringList CMakeBuildSystem::filesGeneratedFrom(const QString &sourceFile) cons
|
|||||||
void CMakeBuildSystem::runCMake()
|
void CMakeBuildSystem::runCMake()
|
||||||
{
|
{
|
||||||
BuildDirParameters parameters(m_buildConfiguration);
|
BuildDirParameters parameters(m_buildConfiguration);
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due \"Run CMake\" command";
|
||||||
m_buildDirManager.setParametersAndRequestParse(parameters,
|
m_buildDirManager.setParametersAndRequestParse(parameters,
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||||
| BuildDirManager::REPARSE_FORCE_CMAKE_RUN
|
| BuildDirManager::REPARSE_FORCE_CMAKE_RUN
|
||||||
@@ -288,6 +300,7 @@ void CMakeBuildSystem::runCMake()
|
|||||||
void CMakeBuildSystem::runCMakeAndScanProjectTree()
|
void CMakeBuildSystem::runCMakeAndScanProjectTree()
|
||||||
{
|
{
|
||||||
BuildDirParameters parameters(m_buildConfiguration);
|
BuildDirParameters parameters(m_buildConfiguration);
|
||||||
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to \"Rescan Project\" command";
|
||||||
m_buildDirManager.setParametersAndRequestParse(parameters,
|
m_buildDirManager.setParametersAndRequestParse(parameters,
|
||||||
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
BuildDirManager::REPARSE_CHECK_CONFIGURATION
|
||||||
| BuildDirManager::REPARSE_SCAN);
|
| BuildDirManager::REPARSE_SCAN);
|
||||||
|
@@ -157,7 +157,7 @@ void CMakeManager::clearCMakeCache(BuildSystem *buildSystem)
|
|||||||
void CMakeManager::runCMake(BuildSystem *buildSystem)
|
void CMakeManager::runCMake(BuildSystem *buildSystem)
|
||||||
{
|
{
|
||||||
auto cmakeBuildSystem = dynamic_cast<CMakeBuildSystem *>(buildSystem);
|
auto cmakeBuildSystem = dynamic_cast<CMakeBuildSystem *>(buildSystem);
|
||||||
QTC_ASSERT(cmakeBuildSystem, return);
|
QTC_ASSERT(cmakeBuildSystem, return );
|
||||||
|
|
||||||
if (ProjectExplorerPlugin::saveModifiedFiles())
|
if (ProjectExplorerPlugin::saveModifiedFiles())
|
||||||
cmakeBuildSystem->runCMake();
|
cmakeBuildSystem->runCMake();
|
||||||
|
Reference in New Issue
Block a user