summaryrefslogtreecommitdiffstats
path: root/qmake/Makefile.unix
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-01-07 12:23:47 +0300
committerThiago Macieira <thiago.macieira@intel.com>2017-03-20 21:56:01 +0000
commit8a3e8856e5606ec616d4420ff8c4f77969432390 (patch)
treeefb7fcc2a0d63c27e510af67d9ffa7dfef1f2901 /qmake/Makefile.unix
parentb71b8ff28305318c72562c8a245cbcf55a043836 (diff)
qmake: Add test functions for comparing version numbers
qmake really lacks version comparing functions: users either use ugly constructions to compare versions by components, such as greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4): or even incorrectly compare versions as strings: !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): Add test functions versionAtLeast and versionAtMost which use QVersionNumber to compare version numbers by components. Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake/Makefile.unix')
-rw-r--r--qmake/Makefile.unix8
1 files changed, 6 insertions, 2 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 4df0ff281f..768cc0248e 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -30,8 +30,8 @@ QOBJS = \
qarraydata.o qbitarray.o qbytearray.o qbytearraymatcher.o \
qcryptographichash.o qdatetime.o qhash.o qlinkedlist.o qlist.o \
qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o \
- qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qvsnprintf.o \
- qxmlstream.o qxmlutils.o \
+ qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qversionnumber.o \
+ qvsnprintf.o qxmlstream.o qxmlutils.o \
$(QTOBJS) $(QTOBJS2)
# QTOBJS and QTOBJS2 are populated by Makefile.unix.* as for QTSRC (see below).
# Note: qlibraryinfo.o omitted deliberately - see below.
@@ -120,6 +120,7 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/tools/qstring_compat.cpp \
$(SOURCE_PATH)/src/corelib/tools/qstring.cpp \
$(SOURCE_PATH)/src/corelib/tools/qstringlist.cpp \
+ $(SOURCE_PATH)/src/corelib/tools/qversionnumber.cpp \
$(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp \
$(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp \
$(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp \
@@ -356,6 +357,9 @@ qlocale_unix.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp
qlocale_win.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<
+qversionnumber.o: $(SOURCE_PATH)/src/corelib/tools/qversionnumber.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) $<
+
qdatastream.o: $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $<