summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@digia.com>2014-10-27 17:05:23 +0100
committerMichael Bruning <michael.bruning@digia.com>2014-10-28 10:27:04 +0100
commit7639513f94fe45b5202349d2891e46b2295606a0 (patch)
treecf086b81fb97c535cc6de9ccc6cdb1c687d52cea
parentad5185ce17e60d2c0a777e0b76b991708d28b9f2 (diff)
downloadqtwebengine-7639513f94fe45b5202349d2891e46b2295606a0.tar.gz
Add checks for python and GCC versions.
The GCC version check is only run on Linux. Change-Id: I524508d763005190764526ce337dc348e5ba4fcb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--tools/qmake/mkspecs/features/functions.prf16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 0fb6aca60..93b5eec98 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -2,11 +2,27 @@ defineTest(isPlatformSupported) {
static: return(false)
osx:lessThan(QMAKE_XCODE_VERSION, 5.1): return(false)
+ linux-g++*:!isGCCVersionSupported():return(false)
+ !isPythonVersionSupported(): return(false)
linux-g++*|win32-msvc2013|macx-clang: return(true)
boot2qt: return(true)
return(false)
}
+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)
+ return(false)
+}
+
+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)
+ return(false)
+}
+
# Map to the correct target type for gyp
defineReplace(toGypTargetType) {
equals(TEMPLATE, "app"):return("executable")