Commit Graph

1391 Commits

Author SHA1 Message Date
Andy Shaw
b2cb83ecbb Pass the absolute path with the file when finding files
When generating a project, the directories can be specified as arguments
to the qmake call. As a result files can either be incorrectly added to
the project with a leading slash, or can end up duplicated. By passing
the absolute path with the file, it ensures that the file is added
correctly and no duplicates occur as a result.

Task-number: QTBUG-48342
Change-Id: If774de8d7f5cceca80042a25a3aa4e5b045249da
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-19 08:39:40 +00:00
Orgad Shaneh
f5f772849c qmake: Delete static library before calling ar on MinGW
This was already done on unix, but not for MinGW.

If the archive already exists, it is appended rather than replaced.

This can cause invalid references when whole-archive linking is used
and some object file that was already linked was deleted.

Change-Id: Ie265371f197d996d57002b248043736544ee641e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:27 +00:00
Orgad Shaneh
9ac4a9ef26 qmake: Fix initialization order in VcprojGenerator ctor
Detected by clang

Change-Id: I17b49b1737ca4a9ab6608a5d8701a9e1c50af5ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:23 +00:00
Orgad Shaneh
67f9a8c57b qmake: Use braces for struct initialization in MSVC object model
Detected by clang

Change-Id: I4c5fbdb402f55ce40e84a6a40ead6c32a60cfa22
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-06-12 10:47:19 +00:00
Orgad Shaneh
d71761ec1f qmake: Delete unused variables in MSBuild object model
Detected by clang.

Remove also comments that reference unused variables.

Change-Id: I6de54d96cd23b93eed6d109629a9462b7770e94e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:13 +00:00
Orgad Shaneh
7f5635cbb1 qmake: Avoid raw string comparison
Detected by clang.

Change-Id: I4c734d1af77a331d178ce91610ab08a8048fe410
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-06-12 10:47:08 +00:00
Oswald Buddenhagen
5afde92bd7 make mkspecs not mess up -rpath-link
adding shared install paths via QMAKE_LFLAGS in the spec has the tiny
side effect that they are searched _first_, which is generally a really
bad idea - they should be _last_.

for that purpose, introduce QMAKE_RPATHLINKDIR_POST, and migrate all
specs to use it.

QMAKE_RPATHDIR_POST is added for consistency, but not actually used.

Task-number: QTBUG-59457
Change-Id: Iac6cda5e9111ef8cca454a69861fe8408bb40589
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:14 +00:00
Oswald Buddenhagen
6dcd944dee make mkspecs not mess up library and include search paths
adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the
tiny side effect that they are searched _first_, which is generally a
really bad idea - they should be _last_.

for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names
(i.e., search them actually last) and migrate all affected specs to use
them.

Task-number: QTBUG-40825
Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:09 +00:00
Joerg Bornemann
808cc8853b Fix parsing of MSVC's /utf-8 option, take 2
The dash was missing. This commit amends 70e772079.

Task-number: QTBUG-59431
Change-Id: I18f3519a502ca57336cafad574f8738f2e717740
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 17:25:50 +00:00
Joerg Bornemann
39c835b9c5 Do not warn about unknown MSVC compiler conformance options
Every /Zc:XXX option qmake doesn't know about yields a "WARNING: Could
not parse Compiler option '-Zc:XXX'; added to AdditionalOptions."

Put all /Zc:XXX options we don't handle into AdditionalOptions without
printing a warning. There's no point in making all options known to
qmake and updating them for every MSVC release.

Change-Id: I319e027791a7b0a29d139ee3074ab1aed8ce8a63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 06:55:17 +00:00
Simon Hausmann
50acc86804 Simplify built-in qmake install command
As the directory installation command also works with files as a source
we can unify the external commands, resulting in simpler command lines.

Change-Id: I65013626eedbdb3ce1c77ed230d46edd1603b986
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-04 09:40:48 +00:00
Oliver Wolff
9baf7bad59 VS 2017: Fall back to "x86" as arch if it is not "arm" or "x64"
The same as for other visual studio versions use "x86" as arch instead
of win32. arch is used to determine library paths and these use x86 and
not win32.

As compilerArch is not used in MSVC 2017 it can be removed.

Task-number: QTBUG-60530
Change-Id: I47157eb1d7ae9d913461210d34858ffb37c81586
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-03 06:52:29 +00:00
Simon Hausmann
c12b96daf2 Preserve last modification timestamps of installed directories
Similar to the two parent commits, this patchs preserves the time stamps
of files we install as a result of recursive directory copying.

Change-Id: Id5931a467196d5cd67acfa0deffc2488af8a3669
Task-number: QTBUG-59004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-02 10:27:15 +00:00
Simon Hausmann
0942f44454 Fix make install to be deterministic
The result of "make install" should be the same regardless of whether it
has been run multiple times and the destination exists already. This is
done by making the file installation calls always take canonical source
and target paths and not look at the target directory.

Task-number: QTBUG-60370
Change-Id: I83a584c0dbc4fd10c79976d4169bf6bc051884a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-28 13:46:44 +00:00
Jake Petroules
097073fa67 Fix precompiled headers on Apple platforms, with multiple architectures
The original commit only added support for GCC and Clang, but not ICC.

Amends 73331eeb

Change-Id: Id7638cf1b538edb1008fb3aa10754c1f517a994f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-14 00:00:56 +00:00
Simon Hausmann
f074d72c8f Preserve last modification timestamps of installed program files
Similar to the parent commit, this patch adds a unified code path in
qmake itself for installing program files while preserving their
original last modification timestamp.

Change-Id: I7b7dcfa6228c2bfd48ea6036549398bb6f90032f
Task-number: QTBUG-59004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-13 11:33:21 +00:00
Liang Qi
94c576cf66 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
2017-04-12 20:08:56 +02:00
Simon Hausmann
2ad7f6ddf5 Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to
preserve the last modification timestamps of files. On Windows the use
of copy does not preserve them. As a cross-platform solution, this patch
introduces a simple built-in install command in qmake to copy files.

Task-number: QTBUG-59004
Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 15:50:51 +00:00
Oswald Buddenhagen
05b3295a57 write Libs.private to .pc files only in static builds
projects using a dynamic build are not supposed to access this variable
anyway.

Task-number: QTBUG-51598
Change-Id: I81b55ea9ba460b80919f40ed7fe3d52129636b9e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2017-04-11 11:19:01 +00:00
Oliver Wolff
2019e78d87 qmake: Do not mix canonical and non canonical paths
When having Qt sources in a symbolic link "shadowed" did not work
because _PRO_FILE_PWD_ used canonical path, while source_root did not.
Due to this mix it was possible that shadowedPath did not find any
"common denominator" and always returned and empty string. The first
place where things broke was while running config.tests.

Task-number: QTBUG-59319
Change-Id: If73ecbc58290ee9113f887a73c312ebfb5e20a33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 05:37:52 +00:00
Joerg Bornemann
7e15df0333 Doc: Move $$files() documentation to "Built-in Replace Functions"
files is not a test function.

Change-Id: I6d23dac5d1c87bd35961406dd62cc3cf37d652e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-04 11:53:05 +00:00
Nico Vertriest
710da40ac0 Doc: link error in qmake manual
qmake-manual.qdoc:3226: warning: Can't link to 'system(command[, mode])'

Change-Id: I22f7a9a79594d204b67796219bb84a60e76e92b1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-03-28 12:30:33 +00:00
Vikas Pachdha
95b3ea08f8 Doc: Add documentation for new iOS variables in qmake manual
documentation of QMAKE_DEVELOPMENT_TEAM and
QMAKE_PROVISIONING_PROFILE

Change-Id: Id5854862e44387e31db40f574d85f88512c27f0c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-28 08:11:07 +00:00
Joerg Bornemann
02d9225db5 Fix uninitialized VCLinkerTool::DebugInfoOption
Due to that uninitialized variable /DEBUG:FASTLINK ended up in vcxproj
files for VS < 2015. However, that option is supported by VS >= 2015
only.

Task-number: QTBUG-59630
Change-Id: I34d9eef1a3bf2262bac48962938afe84eb7de934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 16:15:15 +00:00
Liang Qi
65faf45655 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/plugins/platforms/eglfs/eglfs-plugin.pro

Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
2017-03-21 19:07:53 +01:00
Thiago Macieira
3548cdedb6 qmake: Add _CRT_SECURE_NO_WARNINGS to all MSVC-like compilers
The warning comes from the MS headers, not from the compiler.

Task-number: QTBUG-59576
Change-Id: Ie67d35dff21147e99ad9fffd14acd7fb628fa1d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 19:31:40 +00:00
Liang Qi
77e71dac16 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-13 19:45:20 +00:00
Joerg Bornemann
70e772079f Fix parsing of the /utf8 MSVC compiler flag in VS project generator
Adding the /utf8 compiler flag resulted in undefining all preprocessor
symbols for VS project files, because the ingenious compiler option
parsing logic checked for a 'u' prefix, and "utf8" obviously matched.

The /utf8 flag is added to the additional options, because there doesn't
seem to be an XML tag for that.

Task-number: QTBUG-59431
Change-Id: I762fcdcf6caf0606b40633861e265df5edb4a9c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-13 16:43:21 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Vikas Pachdha
f06f1adb6c Add QMake variables for development team and provisioning profile
Adding both development team and provisioning profile to Xcode
switches off the automatic signing

Task-number: QTBUG-38782
Change-Id: Ic869e16490c11e369b6674c815e860cac66c5afa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-13 06:42:15 +00:00
Andy Shaw
32463399f7 Add documentation for QMAKE_LINK variable
Change-Id: I39f11f42750c705feabf5e1a87bcd277693af1fb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-08 07:56:29 +00:00
Joerg Bornemann
a12a3c6c8c Fix MSVC Makefiles when SOURCES is empty
Call sites of NmakeMakefileGenerator::writeResponseFileFiles expect that
the output is terminated with '\n'. Do not bail out if files is empty.

Task-number: QTBUG-59305
Change-Id: Id3fef8dbc506dad1868e6b352119f5f27b50a368
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 13:54:57 +00:00
Ulf Hermann
c925400bde qmake: Check for QT_CONFIG(process) in qmakebuiltins
The code in question is obviously checking for support of QProcess, not
for general bootstrap mode. You can manually disable QProcess, in which
case it is still not available after bootstrapping is done.

Change-Id: Ia99810b8900621911a31912034358a01af4f18a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 14:16:08 +00:00
Simon Hausmann
d83a20af1d Improve time stamp precision of qmake's touch function
On POSIX compliant platforms, the default precision we apply to
preserving time stamps is seconds. However we can do better and use
utimensat() - if available - to increase the precision to nanoseconds.
The values are provided by statbuf's st_mtim. This is guarded for
compatibility with older systems, similar to commit
494ced1329.

Change-Id: I6928660230d84f8511bf0f58e268906d2e575e04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-01 05:19:56 +00:00
Liang Qi
c577f6edaf Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/plugin/qlibrary_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp

Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
2017-02-16 21:51:11 +01:00
Kai Koehne
414a124e81 Doc: Remove mentioning of Windows CE from qmake documentation
Change-Id: Ibfd575a63dd80b1571d1ba61d593aff75dd83f9f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-14 12:48:35 +00:00
Liang Qi
27432d40f2 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
2017-02-14 11:33:02 +01:00
Joerg Bornemann
1b46872cde qmake/nmake: Prevent overlong lines in link and lib response files
Linking with too many object files could lead to "LNK1170: line in
command file contains 131071 or more characters". Do not write all .obj
files into one line but respect a limit of 1000 characters. If the limit
is reached the object files are separated by newlines instead of spaces.

Task-number: QTBUG-58710
Change-Id: Ibae1f737d6b614a9624b4e00cdd21d3722d341e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-13 14:48:15 +00:00
Oswald Buddenhagen
b052d0cffd rename qvector.cpp => qvector.qdoc
the file contains no code.

this avoids complaints from ar/ranlib in static/bootstrapped builds.

Change-Id: Iee22ffc61a5f9ea8c25f5455b7e8e017ac521624
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-09 14:56:01 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Oswald Buddenhagen
4adc1012e1 add a bunch of complementary options to -after
in particular, -before (just for symmetry, as it's the default), -early
(the actual objective), and -late (for symmetry again).

Change-Id: I274303582a348b052c3e5106ff360ab4fd7d4ee2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:34:17 +00:00
Oswald Buddenhagen
dcd5cb9736 Merge remote-tracking branch 'gerrit/dev' into HEAD 2017-02-01 21:00:55 +01:00
Thiago Macieira
e0ecdebaa1 Unbreak the build with ICC on Windows
Commit 52d64fca66 made qlibraryinfo.obj be
compiled with an extra -D argument, but that doesn't take effect since a
precompiled header is in effect.

 Warning #673: the initial sequence of preprocessing directives is not compatible with those of precompiled header file "qmake_pch.pchi"
 qlibraryinfo.cpp(61): catastrophic error: cannot open source file "qconfig.cpp"

Change-Id: Iab7c358838e1487387a2fffd149d74a9aa2be338
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-27 23:04:58 +00:00
Jake Petroules
944110089d Build Qt libraries with -fapplication-extension
This ensures at compile-time that Qt libraries do not use any APIs that
are not safe for use in application extensions, and fixes warning
messages that appear when linking to Qt libraries that are not built
with this flag, when used in an application extension.

This is especially important on watchOS where *all* "applications" are
actually application extensions, and on other Apple platforms if
application extensions are developed using Qt.

Task-number: QTBUG-40101
Change-Id: I022046f2584e0222253d33052b0abc221d7c93d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-27 22:10:01 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Jesus Fernandez
decab46c23 Fix qmake -project in an empty folder
Avoids iterating over the entire filesystem.

Task-number: QTBUG-57569
Change-Id: If089842553978843de73559d1b1a567aa322a047
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-23 13:20:42 +00:00
Orgad Shaneh
fa6444939c Support QMAKE_PRE_LINK and QMAKE_POST_LINK for static libs on unix
prelink was not supported at all for ar.

postlink was done for most cases, but missing in one particular ar
invocation.

Task-number: QTBUG-57276
Change-Id: Ic72c42a9502c97d7111b3f3941b387024d46a27d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 17:05:33 +00:00
Oliver Wolff
d9203fa534 winrt: Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I57ecfd0751538dcba41ebaf028de1bc5b4debbb7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-20 13:09:16 +00:00
Oswald Buddenhagen
0796c62ad5 add depend_includepath to the qmake manual
Task-number: QTBUG-1834
Started-by: Kavindra Palaraja <kavindra.d+qt@gmail.com>
Change-Id: I3f906f3141f48072bd29e08d99193a2dcd847926
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:54 +00:00
Maurice Kalinowski
d3eec16862 Remove support for WinRT 8.1 and Windows Phone 8.1
[ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1.

Task-number: QTBUG-57288
Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-01-18 12:38:56 +00:00