diff options
author | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-01-09 11:05:04 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@theqtcompany.com> | 2015-01-16 14:39:21 +0100 |
commit | 1364ba04b2df4e91d8f648fb02e0c19dcac1ab30 (patch) | |
tree | 197488e4956acec62419499b6f883d1ca33bb0f0 /tools/qmake/mkspecs/features/functions.prf | |
parent | a6ac2fdd2366f00610cd5e26c88d65f97e93e15c (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/functions.prf')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index acf15a811..4c2547d57 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -1,16 +1,19 @@ defineTest(isPlatformSupported) { - static: return(false) + static { + skipBuild("Static builds of QtWebEngine aren't supported.") + return(false) + } osx:lessThan(QMAKE_XCODE_VERSION, 5.1) { - warning("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") + skipBuild("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") return(false) } - linux-g++*:!isGCCVersionSupported():return(false) + linux-g++*:!isGCCVersionSupported(): return(false) !isPythonVersionSupported(): return(false) linux-g++*|win32-msvc2013|macx-clang: return(true) boot2qt: return(true) - warning("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation".) + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") return(false) } @@ -18,7 +21,7 @@ defineTest(isPythonVersionSupported) { python_major_version = $$system('python -c "import sys; print sys.version_info.major"') python_minor_version = $$system('python -c "import sys; print sys.version_info.minor"') greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true) - warning("Using Python version "$$python_major_version"."$$python_minor_version", but at least Python version 2.7 is required to build Qt WebEngine.") + skipBuild("Using Python version "$$python_major_version"."$$python_minor_version", but at least Python version 2.7 is required to build Qt WebEngine.") return(false) } @@ -26,7 +29,7 @@ defineTest(isGCCVersionSupported) { # The below will work for gcc 4.6 and up and also match gcc 5 greaterThan(QT_GCC_MINOR_VERSION, 5):return(true) greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true) - warning("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.6 is required to build Qt WebEngine.") + skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.6 is required to build Qt WebEngine.") return(false) } @@ -140,3 +143,8 @@ defineReplace(findOrBuildNinja) { } return($$out) } + +defineTest(skipBuild) { + skipBuildReason = "$$skipBuildReason $${EOL}$$1" + export(skipBuildReason) +} |