forked from qt-creator/qt-creator
Qmake: Fix redundant qmake execution for sub-project build
When building a sub-project using the context menu -> Build, qmake was executed every time, because the pro file in the Makefile was compared against the root project instead of the sub-project. Change-Id: Id76d7d23e3fa9a8e4c5c10cd10adcc945ff3b186 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
fe525d2b86
commit
77941ef9b3
@@ -357,9 +357,11 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
|
||||
return MakefileForWrongProject;
|
||||
}
|
||||
|
||||
if (parse.srcProFile() != qs->project()->projectFilePath().toString()) {
|
||||
const Utils::FileName projectPath =
|
||||
m_subNodeBuild ? m_subNodeBuild->filePath() : qs->project()->projectFilePath();
|
||||
if (parse.srcProFile() != projectPath.toString()) {
|
||||
qCDebug(logs) << "**Different profile used to generate the Makefile:"
|
||||
<< parse.srcProFile() << " expected profile:" << qs->project()->projectFilePath();
|
||||
<< parse.srcProFile() << " expected profile:" << projectPath;
|
||||
if (errorString)
|
||||
*errorString = tr("The Makefile is for a different project.");
|
||||
return MakefileIncompatible;
|
||||
|
||||
Reference in New Issue
Block a user