summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2016-03-03 10:31:32 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-03-03 10:18:08 +0000
commit48f32572590e45a57573944c0822855819d138df (patch)
treefd12c393b4f2bf1650627f7b8aa0c03fa6c291f1
parent14ef85f4cc57413b0b8c08448c6e66b21ccc9740 (diff)
Exclude gcc 4.6 and belowv5.6.0
Change-Id: I3fca8f979f861e75d74dd4eabc3e7cab376f239b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
-rw-r--r--qtserialbus.pro10
1 files changed, 10 insertions, 0 deletions
diff --git a/qtserialbus.pro b/qtserialbus.pro
index 97b60e6..62774c0 100644
--- a/qtserialbus.pro
+++ b/qtserialbus.pro
@@ -6,6 +6,16 @@ requires(!win32-msvc2010) # not C++11 capabable -> will be removed from CI soon
requires(!win32-msvc2008) # not C++11 capabable -> will be removed from CI soon
requires(c++11)
+defineTest(isGCCVersionSupported) {
+ # The below will work for gcc 4.7 and up and also match gcc 5
+ greaterThan(QT_GCC_MINOR_VERSION, 6):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.7 is required")
+ return(false)
+}
+
+gcc:!clang:!isGCCVersionSupported(): requires(false)
+
lessThan(QT_MAJOR_VERSION, 5) {
message("Cannot build current QtSerialBus sources with Qt version $${QT_VERSION}.")
}