Skip to content

Commit

Permalink
qmake uses the QMAKE_ALLOW_CIRCULAR_INCLUDES property to enable circu…
Browse files Browse the repository at this point in the history
…lar includes
  • Loading branch information
MikWells committed Feb 24, 2025
1 parent 2bba4d4 commit 7ff0aa6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions qmake/library/qmakeevaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1938,10 +1938,16 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileChecked(
return ReturnFalse;
const QMakeEvaluator *ref = this;
do {
static bool allowCircular = propertyValue("QMAKE_ALLOW_CIRCULAR_INCLUDES").toInt();
for (const ProFile *pf : ref->m_profileStack)
if (pf->fileName() == fileName) {
evalError(fL1S("Circular inclusion of %1.").arg(fileName));
return ReturnFalse;
if (!allowCircular) {
evalError(fL1S("Circular inclusion of %1.").arg(fileName));
return ReturnFalse;
} else {
languageWarning(fL1S("Circular inclusion of %1.").arg(fileName));
break;
}
}
} while ((ref = ref->m_caller));
return evaluateFile(fileName, type, flags);
Expand Down

0 comments on commit 7ff0aa6

Please sign in to comment.