From ce1964ddcff9a213ad33fc8ba3a35b6d4322fadf Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Tue, 4 Jul 2017 11:57:09 +0200 Subject: 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 --- configure.pri | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'configure.pri') 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) { -- cgit v1.2.3