diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-07-04 11:57:09 +0200 |
---|---|---|
committer | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-07-05 09:24:52 +0000 |
commit | ce1964ddcff9a213ad33fc8ba3a35b6d4322fadf (patch) | |
tree | b582b358d864adf8ecf9d47ff00bc0c26c6772e3 | |
parent | da2e7b1331cb27142058a9f1d1debd363c5dd151 (diff) |
Add Configure-Time Tests for gperf, flex and bison
Configure-Time tests for presence of (required) gperf, bison and flex
are added to configure.pri and configure.json, so that we can decide
early on to skip the build, instead of starting a build that
will fail much later, yield incomprehensible error messages and
make the build of the complete Qt framework fail.
Task-number: QTBUG-52805
Change-Id: I7dab49e6e8672b72901519ad7d88de97197fe587
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | configure.json | 42 | ||||
-rw-r--r-- | configure.pri | 30 | ||||
-rw-r--r-- | mkspecs/features/configure.prf | 13 |
3 files changed, 85 insertions, 0 deletions
diff --git a/configure.json b/configure.json index e82247ec5..69d261a00 100644 --- a/configure.json +++ b/configure.json @@ -67,6 +67,18 @@ "type": "detectPython2", "log": "location" }, + "gperf": { + "label": "gperf", + "type": "detectGperf" + }, + "bison": { + "label": "bison", + "type": "detectBison" + }, + "flex": { + "label": "flex", + "type": "detectFlex" + }, "ninja": { "label": "system ninja", "type": "detectNinja" @@ -89,6 +101,21 @@ { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.python2.location" } ] }, + "gperf": { + "label": "gperf", + "condition": "tests.gperf", + "output": [ "privateFeature" ] + }, + "bison": { + "label": "bison", + "condition": "tests.bison", + "output": [ "privateFeature" ] + }, + "flex": { + "label": "flex", + "condition": "tests.flex", + "output": [ "privateFeature" ] + }, "embedded": { "label": "Embedded build", "purpose": "Enables the embedded build configuration.", @@ -185,6 +212,21 @@ "type": "warning", "condition": "!features.python2", "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.gperf", + "message": "gperf is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.bison", + "message": "bison is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.flex", + "message": "flex is required to build QtWebEngine." } ], diff --git a/configure.pri b/configure.pri index ce36642bb..2d6983354 100644 --- a/configure.pri +++ b/configure.pri @@ -41,6 +41,36 @@ defineTest(qtConfTest_detectPython2) { return(true) } +defineTest(qtConfTest_detectGperf) { + gperf = $$qtConfFindInPath("gperf$$EXE_SUFFIX") + isEmpty(gperf) { + qtLog("Required gperf could not be found.") + return(false) + } + qtLog("Found gperf from path: $$gperf") + return(true) +} + +defineTest(qtConfTest_detectBison) { + bison = $$qtConfFindInPath("bison$$EXE_SUFFIX") + isEmpty(bison) { + qtLog("Required bison could not be found.") + return(false) + } + qtLog("Found bison from path: $$bison") + return(true) +} + +defineTest(qtConfTest_detectFlex) { + flex = $$qtConfFindInPath("flex$$EXE_SUFFIX") + isEmpty(flex) { + qtLog("Required flex could not be found.") + return(false) + } + qtLog("Found flex from path: $$flex") + return(true) +} + defineTest(qtConfTest_detectNinja) { ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX") !isEmpty(ninja) { diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index c1e919603..a07171b3e 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -24,6 +24,19 @@ defineTest(runConfigure) { include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) QT_FOR_CONFIG += webengine-private + !qtConfig(gperf) { + skipBuild("Required gperf could not be found.") + return(false) + } + !qtConfig(bison) { + skipBuild("Required bison could not be found.") + return(false) + } + !qtConfig(flex) { + skipBuild("Required flex could not be found.") + return(false) + } + qtConfig(pepper-plugins): WEBENGINE_CONFIG += use_pepper_plugins qtConfig(printing-and-pdf): WEBENGINE_CONFIG += use_printing use_pdf qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs |