C preprocessors augment their standard list of include paths from the
environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and
$CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses
the an environment variable simply called "INCLUDE". Handling this for
MSVC is particularly important because the VCVARSALL.BAT script sets the
necessary #include paths in the environment for important things.
Without that being parsed, moc won't find some #defines, like
WINAPI_DESKTOP_FAMILY.
[ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio
environment variables (set by the VCVARSALL.BAT script) to find system
include files. A possible consequence is that moc parses application
headers slightly differently, depending on #if conditions that depended
on macros that previous versions had not seen #define'd. Implementers of
other buildsystems are advised to pass the --compiler-flavor=msvc option
to moc.
Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.
Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).
The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.
Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Conflicts:
qmake/library/qmakeevaluator.cpp
One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line. Trivial resolution.
Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
Now that -l and -fw options are gone, using a combined EXTRA_LIBS
makes no sense anymore and only complicates things.
Change-Id: Ic12bf482f3bed041aff7f0891f008b1f34ae2b4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This was missed in ab599a3931 when
QMAKE_STRIP was set as a side effect of adding support for separate
debug info.
Task-number: QTBUG-54212
Change-Id: I86dd040dbefec4c58879c7d029ed89dd8bad3daf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
exclusive_builds_post.prf (via default_post.prf) processes
debug_and_release into BUILDS, so .prfs which can rely on being
executed later (because they are loaded via CONFIG) can rely on BUILDS
and related variables.
Change-Id: I5677079ad5145bf493af17b4b60347208572fd21
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
the whole point of the check is ensuring that the message is printed
only once for each sub-project, so !build_pass alone is fully adequate.
Change-Id: Ib8f821ead6709efc9bfa935e1d05f8caba02a814
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This patch adds a warning that will be shown when link_pkgconfig is used
in a project but Qt's configuration has it disabled. This can happen
when Qt is built before pkg-config has been installed or if it's not
detected.
This will avoid user losing time trying to make pkg-config work while Qt
just ignores it.
Change-Id: Ieeff8dd6784b9430cfebef355855ec1be91bc96e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
As OpenBSD ships its own X11, linker errors occur when not explicitly
adding the X11R6/lib dir to rpath dirs.
Change-Id: I75991e9d7de115d2d212a017d9c8f9aa93cecc27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
On OpenBSD, the system compiler shipped is still gcc 4.2.1 but for proper
C++11 support in Qt, QtCreator and Qt-based projects we need to use
the compilers provided in ports/packages which have the binaries renamed
to eg++/egcc. Therefore, redefine the variables from g++-base.conf to
use the newer compilers.
Change-Id: Ic8ea1c5d2c2c0263dad5ae85c8c747bcd3985b7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This was only used to specify XP as a target which is
not supported on 5.8 anymore. Clean up all associated
special handling in the mkspecs and pro files.
This effectively reverts change 10a0ac75.
Change-Id: I420d73002912989f1a5be961a2d09277ec4a4425
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
It's only used in one place, where it's actually not required either.
Change-Id: I5766d2b5f0c1083bbd58a9b9fb07cc67bbd46a94
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This is not a feature that should get propagated to other
configure runs, so simply hardcode support for it.
Change-Id: Ieb1c33243154b3583e91061d3592d7e87c36f402
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Detect host and target architecture from within qmake, and set
QT_ARCH accordingly.
Change-Id: I30255f88c7645d197bd07355a1dff02b377cbbe8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The regexp were capturing too greedy:
$$replace(c, "^--?(.*)", "\\1") changes --developer-build to
-developer-build. Do not accidentally capture the second dash.
Change-Id: I19586a1678fc3bf3f450ec31f5bd7e71e9514b34
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
NetBSD is heavily dependent on using rpath, so we need to add the
lib dir QMAKE_LIBDIR and QMAKE_LIBDIR_X11 to QMAKE_RPATHDIR
explicitly to avoid linker errors. See http://www.netbsd.org/docs/elf.html
for more info.
Change-Id: I225143d5e2d9a125060b14e3a8a7953927d63b33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
10586 reflects Update 1, which is the mininum supported version for many
months, hence reflext this in the manifest template as well.
There are additional features (like drag and drop) which require and
even later SDK version. However, they do not reflect the minimum.
Change-Id: I6d71dc499c928ed98c8a25283e0b53994317bb00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qmake tries to use pkg-config when the config.test contains PKG_CONFIG,
which will of course fail without the sysrooted env vars. and unlike in
the old configure, these don't become automatically available by virtue
of the script simply exporting them.
longer-term, the test programs shouldn't mention pkg-config deps
explicitly, as these are redundant with what is specified in the JSON
file. relevant changes are already pending.
Task-number: QTBUG-54403
Change-Id: Ie9d3bbb2e4febffde5fd122d7d0a8b70b8679fcc
Reviewed-by: Liang Qi <liang.qi@qt.io>
don't have extra spaces in the pkg-config calls when no environment
variables are injected.
Change-Id: Ieb14f775b2a04726e8f62114b69d9be7fa662eb0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
using the Makefile target separator to determine the host system is of
course not a terribly good idea. the correct variable to query would be
DIR_SEPARATOR, which always reflects the host. however, a direct os
query is less obscure in this case.
Task-number: QTBUG-54346
Change-Id: I6bc1372a7c9a84a241a97f9f767f046b026411c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
while the names of the compilers are actually an undocumented internal,
we don't provide an actually working proper way to sequence extra
compiler execution with build-time generated inputs when they are
indirectly listed (as via .qrc files).
Task-number: QTBUG-54299
Change-Id: I269c26512897b72706dc8b769aa47e8157c2a5c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This follows up ab599a3931, which did not
take installation into account.
Task-number: QTBUG-54036
Change-Id: Ic1b3acb8984255dd1ca1c288b7b150814ce9e606
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
... for a loooong time.
it was replaced by plugin_with_soname (which is unused so far).
Change-Id: Ifc377d155d6eac41e85f3a0914ed817d55b5648b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the tests would inherit MAKEFLAGS, with somewhat predicatble results.
Change-Id: Ia17638f6229d0ae86f5558726850040703d90044
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
libGLES2 (the only user of these libraries) is built dynamically even in
a static qt built when dynamicgl is configured. in this case the static
libraries need not be installed.
amends 2311997.
Change-Id: Ic9bc3937d6ee0d97e0ca7fc96596fa90ebfe8710
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Add x86-64 and aarch64le QNX platforms. These platforms will be
available in QNX 7.0.
Change-Id: Iba1f635ba45fddf1a1caf907415a23a510ba0818
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Command line arguments, configure tests and features are now
defined in a json file and a configure.pri containing some
custom functions.
qmake uses the json file to determine command line arguments,
tests and features to be executed at configuration time.
A new qt_configure.prf contains all the infrastructure to parse
the command line, run the configure tests, determine the set of
available features and create a report about it.
Change-Id: If30ac089dd3e9f8c67ebd642bde10cfa960893bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
And blacklisted a few tests in tst_QUdpSocket.
Conflicts:
src/android/jar/src/org/qtproject/qt5/android/QtNative.java
src/corelib/global/qglobal.cpp
src/corelib/global/qsystemdetection.h
src/corelib/io/qfileselector.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
tests/auto/network/socket/qudpsocket/BLACKLIST
Task-number: QTBUG-54205
Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
don't add framework directories (including the respective marker!).
this is consistent with the unix configure code.
Change-Id: I2e187057bc3fe2b35128cd5dc2af57b9f3685d83
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
iphonesimulator_and_iphoneos was renamed to simulator_and_device in 5.7.
Task-number: QTBUG-54163
Change-Id: If4a76f45450edc0f6e8fb3615355613212314300
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
If macx is present, osx AND macos should be required.
Change-Id: I5cd9d41270c741dc314720a1119b163dd17fdfd7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
As common bsd's are using the -ffunction-sections flags from
mkspecs/common/gcc-base.conf, also use the --gc-sections ld flags
like Linux as all are using GNU ld as their linker and all are
capable of using it. The last remaining problems with --gc-sections
removing the .name sections providing the OS tags for distinction of
the execution layer were solved with NetBSD 6.0 and OpenBSD 5.4, see
http://gnats.netbsd.org/40401 and http://www.openbsd.org/plus54.html
so this option can safely be used now to reduce the size of moc and rcc
tools.
Change-Id: I74ccd4f6bc607f6d82d32fc864875f26b26bf167
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>