summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/configure.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/configure.prf')
-rw-r--r--mkspecs/features/configure.prf9
1 files changed, 8 insertions, 1 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index f275e3ac06..4ca7c6ba07 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -1,5 +1,12 @@
+# Ensure that a cache is present. If none was found on startup, this will create
+# one in the build directory of the project which loads this feature.
+cache()
+
load(configure_base)
+QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
+recheck: write_file($$QMAKE_CONFIG_LOG, "")
+
isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
# Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1
@@ -25,7 +32,7 @@ defineTest(qtCompileTest) {
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$1
test_out_dir = $$shadowed($$test_dir)
- test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+ test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""