summaryrefslogtreecommitdiffstats
path: root/qtserialbus.pro
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2016-03-09 12:47:48 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2016-03-09 14:34:15 +0000
commit7076c45016ac68aaf1cf15e499a8a435ce14f501 (patch)
tree747db93f25f56ec4288a1e558bcdbee534997d33 /qtserialbus.pro
parent03260ac49272b93c5a8fdc54f0fa06f6917c9c39 (diff)
Update .pro file and config tests with stricter requirements.
* Add config test to exclude C++11 incapable compilers. * Add required modules: widgets, serialport, serialbus. Task-number: QTBUG-51655 Change-Id: I015d41fe62fc9e39a40363fffaaaec7fcd286075 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'qtserialbus.pro')
-rw-r--r--qtserialbus.pro22
1 files changed, 5 insertions, 17 deletions
diff --git a/qtserialbus.pro b/qtserialbus.pro
index 62774c0..d0e94f7 100644
--- a/qtserialbus.pro
+++ b/qtserialbus.pro
@@ -1,30 +1,18 @@
-requires(!wince)
-requires(!winrt) # enforced by qtserialport dependency
-requires(!ios) # enforced by qtserialport dependency
-requires(!win32-msvc2012) # does not support variadic templates
-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)
+requires(qtHaveModule(serialport))
lessThan(QT_MAJOR_VERSION, 5) {
message("Cannot build current QtSerialBus sources with Qt version $${QT_VERSION}.")
}
load(configure)
+qtCompileTest(language)
qtCompileTest(socketcan)
qtCompileTest(socketcan_fd)
load(qt_parts)
+requires(config_language) # enforce defined set of C++11
+!config_language:warning("Cannot compile the module with your compiler, missing C++11 language features.")
+
linux {
!config_socketcan:warning("You need linux/can.h and linux/can/raw.h linux headers for socketCAN support, disabling it")
!config_socketcan_fd:warning("Newer kernel needed for flexible data-rate frame support 'canfd_frame'")