From 4494ddfec7e4a74ae1192eed25edf8e3ee294755 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 1 Mar 2012 14:34:48 +0100 Subject: [PATCH] make default_pro.prf advertize dynamically created .qmake.cache moving the detection of .qmake.cache to the qmake startup had the side effect that a suddenly popping up cache would not be picked up by nested projects any more. this is not supposed to work in the first place, but the syncqt hack for building against non-installed modules relies on it. until we have cleaned that up properly, we need a way to notify qmake about the appearance of the cache file. Change-Id: I450646b936e3bb2ef2ed3aba05df58e521ccdc61 Reviewed-by: Marius Storm-Olsen --- mkspecs/features/default_pre.prf | 3 +++ qmake/project.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index 1a56787..9e142f1 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -48,4 +48,7 @@ CONFIG = lex yacc warn_on debug uic resources $$CONFIG } unset(QTFWD) unset(PRO_BASENAME) + + # Let qmake know about the unexpectedly appearing cache file. + _QMAKE_CACHE_ = $$QMAKE_SYNCQT_OUTDIR/.qmake.cache } diff --git a/qmake/project.cpp b/qmake/project.cpp index 0e0ac93..48c5540 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1177,6 +1177,8 @@ QMakeProject::parse(const QString &t, QHash &place, int nu } if(var == "REQUIRES") // special case to get communicated to backends! doProjectCheckReqs(vallist, place); + else if (var == "_QMAKE_CACHE_") + Option::mkfile::cachefile = varlist.isEmpty() ? QString() : varlist.at(0); } return true; } -- 2.7.4