this makes it possible for features added via CONFIG to use QMAKE_USE*,
as default_post.prf is processed before all features in CONFIG.
Change-Id: Id0812a0fb1aa5e658548bd2bc6003234085545e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this adds file_copies.prf, which understands the variable COPIES, which
works analogously to INSTALLS.
i've been holding this off for a long time, as it is not without
caveats. however, similar hacks are proliferating all over the code
base, so it's time we formalized it.
in fact, it's the easiest way to fix some nasty shadow build problems,
which is why i'm adding this on the stable branch.
Task-number: QTBUG-52256
Change-Id: Icbe3b9fbb79c952546aad2d467a438d3a69d749f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.
This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.
The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.
Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
automatically append the .exe extension. this is done unconditionally,
which means that providing it in the spec is wrong by definition.
don't use system("which") (which won't do what we want in a windows
shell), but scan PATH ourselves. as a bonus, this is also faster.
to avoid fetching and splitting the path multiple times, factor out a
function in spec_pre.prf.
Change-Id: I95f0fa285c158b347d45422111f91540e3a595fd
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
"CONFIG += qt warn_on release link_prl" is in every single spec (though
for link_prl there is one genuine exception and two apparent omissions).
Change-Id: I72e1e315586af828eefa3b0b70998ab892ec3c1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
there is no reason whatsoever to duplicate this so many times, and even
less reason to have specs with a deviating default.
Change-Id: Ia25836c079580adebc373697b8bd03598f79c69b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this is cleaner by design and allows removing some hacks.
Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>