configure: support discarding selected test results with -recheck
especially during debugging, it is often necessary to re-run only one (or a few) tests, where -recheck-all would be wasteful. Task-number: QTBUG-64059 Change-Id: I9410894dec4289ff832d7f75e04f9b60fe76c57c Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
af70d4ee85
commit
fd3423bfb8
|
|
@ -66,8 +66,10 @@ Configure meta:
|
|||
-redo ................ Re-configure with previously used options.
|
||||
Additional options may be passed, but will not be
|
||||
saved for later use by -redo.
|
||||
-recheck ............. Discard cached negative configure test results.
|
||||
-recheck [test,...] .. Discard cached negative configure test results.
|
||||
Use this after installing missing dependencies.
|
||||
Alternatively, if tests are specified, only their
|
||||
results are discarded.
|
||||
-recheck-all ......... Discard all cached configure test results.
|
||||
|
||||
-feature-<feature> ... Enable <feature>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
"continue": "void",
|
||||
|
||||
"recheck": { "type": "void", "name": "cache_use", "value": "positive" },
|
||||
"recheck": { "type": "optionalString", "name": "cache_recheck" },
|
||||
"recheck-all": { "type": "void", "name": "cache_use", "value": "none" },
|
||||
|
||||
"redo": { "type": "redo" },
|
||||
|
|
|
|||
|
|
@ -2041,14 +2041,28 @@ qtConfCheckErrors()
|
|||
|
||||
QMAKE_CONFIG_CACHE = $$OUT_PWD/config.cache
|
||||
QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
|
||||
cache_recheck = $$eval(config.input.cache_recheck)
|
||||
equals(cache_recheck, yes) {
|
||||
QMAKE_CONFIG_CACHE_USE = positive
|
||||
cache_recheck =
|
||||
}
|
||||
isEmpty(QMAKE_CONFIG_CACHE_USE): \
|
||||
QMAKE_CONFIG_CACHE_USE = all
|
||||
!equals(QMAKE_CONFIG_CACHE_USE, none) {
|
||||
include($$QMAKE_CONFIG_CACHE, , true)
|
||||
# this crudely determines when to discard the cache. this also catches the case
|
||||
# of no cache being there in the first place.
|
||||
!equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \
|
||||
!equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]) {
|
||||
QMAKE_CONFIG_CACHE_USE = none
|
||||
} else: !isEmpty(cache_recheck) {
|
||||
for (cr, $$list($$split(cache_recheck, ","))) {
|
||||
!isEmpty(cache.$${cr}._KEYS_) {
|
||||
cache.$${cr}._KEYS_ =
|
||||
} else {
|
||||
qtConfAddWarning("Attempting to discard non-cached result '$$cr'.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
equals(QMAKE_CONFIG_CACHE_USE, none) {
|
||||
cont = \
|
||||
|
|
|
|||
Loading…
Reference in New Issue