summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/configure.prf
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-01-09 11:05:04 +0100
committerMichael BrĂ¼ning <michael.bruning@theqtcompany.com>2015-01-16 14:39:21 +0100
commit1364ba04b2df4e91d8f648fb02e0c19dcac1ab30 (patch)
tree197488e4956acec62419499b6f883d1ca33bb0f0 /tools/qmake/mkspecs/features/configure.prf
parenta6ac2fdd2366f00610cd5e26c88d65f97e93e15c (diff)
Refactor our build skipping logic
Move the logic to mkspecs to keep the .pro files robust. Add the basic infrastructure for config.tests, the first one of which will consistently ensure we have libcap on linux. Change-Id: Iee4207e747e589ba67d5353cb4c18f156e555c11 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'tools/qmake/mkspecs/features/configure.prf')
-rw-r--r--tools/qmake/mkspecs/features/configure.prf23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
new file mode 100644
index 000000000..d0cb50877
--- /dev/null
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -0,0 +1,23 @@
+# Load configure.prf from qtbase first
+load(configure)
+load(functions)
+
+defineTest(runConfigure) {
+ webengine_successfully_configured: return(true)
+ # Ignore the cached config tests results in case they were not successful
+ CONFIG += recheck
+ #Override the config.tests path
+ QMAKE_CONFIG_TESTS_DIR = $$QTWEBENGINE_ROOT/tools/qmake/config.tests
+ CONFIG_TESTS = $$files($$QMAKE_CONFIG_TESTS_DIR/*.pro, true)
+ log("Running configure tests$${EOL}")
+ for(test, CONFIG_TESTS) {
+ test = $$basename(test)
+ test ~= s/\\.pro$//
+ qtCompileTest($$test)
+ }
+ # libcap-dev package doesn't ship .pc files on Ubuntu.
+ linux:!config_libcap:skipBuild("libcap appears to be missing")
+
+ isEmpty(skipBuildReason):cache(CONFIG, add, $$list(webengine_successfully_configured))
+}
+