The configure script always returned exit code 0 even if the
underlying cmake call failed. Make sure to exit with the same exit
code that the cmake process does.
[ChangeLog][Build System] The configure script on UNIX systems will
now exit with the same exit code that the underlying cmake process
exited with.
Pick-to: 6.5 6.6
Change-Id: I2cb43e162bb96f4e60320522895aac9bb5c5bc9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The config.redo script can be executed to reconfigure a pre-existing
qt build dir with the configure options that were last passed to the
build.
It just calls the original configure script with the -redo option.
It's nicer than calling configure + -redo manually because you don't
need to write out the full source path for configure.
In qt 5 times this script was called config.status.
On windows the script is called config.redo.bat.
Rename the config.redo file that QtWriteArgsFile.cmake writes to
to config.redo.last, so it doesn't conflict with the name of new
config.redo script.
Amends 5c40cb0f1a
Pick-to: 6.5 6.6
Change-Id: Id47c56a24561410aec6fbaa79b13fc8a78d12ed0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
It is not possible to manually edit the `config.opt` and do a redo, and
`configure/` uses the `config.opt` in this case.
Task-number: QTBUG-108287
Change-Id: I3d87b13a900b97fb50e49a4f155bec964ecb5d1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The script claims to be #!/bin/sh so should not use bash extensions.
Amends 5c40cb0f1a.
Change-Id: Ib88f528acda0893fd6e96878c49ec5a2cf7ebba7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In addition to the fix, I've removed some legacy codes in the
`configure` file and delegated most of the work to
the `QtWriteArgsFile.cmake` which was being used by `configure.bat`. I
am not sure how this was supposed to work before since it was not really
working, but now, `config.opt` lives in the build directory, together
with `config.opt.in` (a template file), and the `config.redo` (and
`config.redo.in`) which holds the full redo command. The template files
are being used to preserve the quoted variables and to help
QtWriteArgFiles process the opt files more consistency.
Also fixed an issue on Unix, where ./configure was failing to run if
its path contained spaces, e.g., `Qt Src/qt5/configure`.
Fixes: QTBUG-108287
Change-Id: I9843b690a1fd3177a93e55e08a3484a4c85ba2e8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In the case of re-doing, `configure` and `configure.bat` pass an extra
parameter to the `QtProcessConfigureArgs.cmake`. As a result, CMake
removes CMakeCache.txt and CMakeFiles/ before the reconfiguration. If
the user is using CMake 3.24 or newer, this is achieved by passing
the `--fresh` option to CMake call. In older CMake(s), CMakeCache.txt
and CMakeFiles/ found in CMAKE_BINARY_DIR will be removed using a
file(REMOVE_RECURSIVE call.
[ChangeLog] The -redo option now additionally removes existing
CMakeCache.txt file, and CMakeFiles/ directory, and recreates them from
scratch.
Task-number: QTBUG-108287
Change-Id: I11a5c8f9df1247d11eb7097552e6764463583346
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The following host-related configure options were unsupported since Qt
6.0 and are now completely removed:
-hostprefix
-external-hostbindir
-host*dir (except -hostdatadir)
-android-ndk-host
Pick-to: 6.2
Change-Id: Ib69d90c40ef546f61bf87b1f443eb9d10f7a5a21
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Qt is built with CMake since 6.0 and the QMake build system was removed
in 6.1. It's time to remove the -cmake and -qmake configure arguments
for Qt 6.2.
Fixes: QTBUG-88286
Change-Id: Ie726ec364ded025f8d93bd69b469561a6ae40aa9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This leaves a very simple script that delegates the heavy configure work
to a CMake script.
This also removes the Makefile templates that were used for
bootstrapping qmake.
Task-number: QTBUG-88742
Change-Id: Iab9c477e0bb611d680bda2cf8aaa7ad88356a8d1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Print an error message when configure is passed the -qmake option.
The only supported way to build Qt now is with CMake.
This means the CMakeLists.txt files are the source of truth now, and
pro2cmake will not have to be used anymore.
The .pro files can be removed at a later time.
The same is true for configure.cmake files. They are the authoritative
source, and the configure.json files will be removed at a later time.
Task-number: QTBUG-88741
Change-Id: Ia9de4c1411978b40b13e9b982977e7818164c984
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously this would result in config.opt file not being written.
Change-Id: I9ce349a7cda9f399fa789a569e46138ea90769f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
People that insist on qmake builds of Qt can configure with -qmake
Task-number: QTBUG-87049
Change-Id: I5729b654d4c8b9c6b526234ba5563aff8fd750e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This option configures Qt with the qmake-based build system.
Currently, this is the default, so this option is a no-op until the
default switches to CMake.
Task-number: QTBUG-87049
Change-Id: I56f3080a4f1423788ffb743287a7b2e67a8e2cc4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When re-doing in a top-level build, we did not read the config.opt file
from the top-level directory.
Also, the config.opt file should not contain the -top-level argument.
This is an internal option, and on Windows, it was already missing. The
information whether we're doing a top-level build is now passed in the
CMake variable TOP_LEVEL.
Change-Id: Iaecd7306a4b6d9ad494684c201cf12f8e74d684b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
One can now place a config.opt file in an otherwise empty build
directory and call 'configure -redo'. If config.opt contains the
-cmake argument, Qt will be built with CMake as expected.
To achieve that, configure must peek into config.opt and look for the
-cmake argument.
Fixes: QTBUG-86097
Change-Id: I35f76caca862e5a59c2fb850e0aeb6529c826149
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The working directory for CMake must be the top-level build dir, not the
qtbase one.
Change-Id: I1090aca8bf2617719e724f96b1fa356eb9fabb46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The configure scripts need to translate configure options to CMake
arguments. It is not sensible to implement this translation twice, in
sh and Windows batch language, so we're doing this once, in CMake
language.
The configure scripts write their options into config.opt and call a
CMake script that reads config.opt, does the translation to CMake
arguments and calls CMake to generate the build system.
While we're at it, implement some more translations than the sh
configure provided, like -extprefix, -top-level and -skip.
Fixes: QTBUG-85349
Fixes: QTBUG-85350
Task-number: QTBUG-85373
Change-Id: Ida5d8b2a3c178b9349d41ec76d190c69a9456e74
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Since the CMake build of Qt needs a special flag (BUILD_WITH_PCH)
we need to detect -no-pch separately in the configure script.
Change-Id: If31e129ba532c00a7e0a7ee817dec6a6a0138ebf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This uses sed -E (extended regular expressions) to improve readability of
regular expressions. Shouldn't be a problem on most modern systems.
Change-Id: I12c9834c1ef83bf5f8547bccff655a6b8525cc3d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is required to be able to port qmake over to use
QRegularExpression instead of QRegExp.
Change-Id: I0ad2c19bf3c0a28e52c1e12b4d3daa0300a75ed2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
The former option to clang will result in more options to the linker,
such as the newly introduced -platform_version, which writes the
SDK version to the resulting binary. By using the syslibroot flag
directly we were missing the platform version, and binaries were
left without an SDK version set, resulting in failed validation
of the binary. Going with the clang driver gives us the right
behavior for free.
Fixes: QTBUG-83100
Change-Id: I98bc9ba644dae4bcc7a6a88481556bae185ce5fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 6a60192ac03d0b4ab542191065122243cebcd1ca)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Translate --ccache and --sanitize=foo into corresponding cmake
variables.
Change-Id: If6e20a715ace7e55e498e3398c592295a4f264c3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)
This patch is quick and dirty, I guess it will be cleaner once we move to cmake
Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features
Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
One of the parameters that Coin passes to configure is this:
-device-option DISTRO_OPTS="hard-float boot2qt"
The configure script would "swallow" the quotes and end up calling qmake
with -device-option DISTRO_OPTS=hard-float boot2qt, causing qmake to
complain that the standalone "boot2qt" option is unknown.
Fix this by preserving the quotes in the forwarding helper functions.
Change-Id: I16098bd35acb579ebf183b0f7746af8758269e7c
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
QML1 is not supported anymore, remove the leftover hooks for it.
Change-Id: I2900726714c5faea3523b2ebe39bb393364b3bfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We have other helper functions like this, and the way they are made
to work is to pass the script's arguments down to them.
Change-Id: I3b80e82a2fb3d6e6a65b2deca3b60e4e0dd8de07
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The separation of functionality into functions in commit
37756ede09 accidentally broke top-level
builds as the function to detect -top-level was operating on local
parameters (shift) or they were not available ($1). Inlining these few
lines fixes it.
Change-Id: Icf609dc5e7b361997847f3ef3a1b10635c122d5d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This makes -developer-mode build tests and examples, too.
Change-Id: I3f1a700c6e9d06ab632990561e13f059acb4e6ff
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This fixes configure with win32-clang-g++ as the native compiler.
Change-Id: Iced43d70b9a0aa413d1f5f6034b42b976cb7c39e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
ultrix and reliant have not seen a release since 1995. dgux not since
2001. bsdi not since 2003. irix not since 2006. osf not since 2010.
dynix... unclear, but no later than 2002. symbian needs no mention.
All considered obsolete, all gone.
sco and unixware are effectively obsolete. Remove them until someone
expresses a real need.
Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
just use 'which' and be done with it. the script was rather arcane, and
worked around deficiencies of cygwin (no longer relevant) and solaris
(assumed to be somewhat sane meanwhile).
Change-Id: I2e11ea3c87ac06a85604ac8d58d8fee95eae2e15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some users don't want to download the full Xcode installation which can
weigh upwards of 5 GB download and 20 GB installed.
[ChangeLog][macOS / iOS] Qt can now be built using just the Xcode
Command Line Tools, without needing to install the full Xcode IDE.
Task-number: QTBUG-35928
Task-number: QTBUG-41908
Change-Id: I6d13c9a03ab9087b3ab56e8547f53f0cc2806c7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
They have not been tested with Qt 5, not even once to make sure
that the mkspec passes the sanity check.
This removes for OSes:
HP-UX (running on PA-RISC -- Itanium still supported)
SGI IRIX
SCO Unix
Tru64 Unix
Unixware
And compilers:
IBM xlC (Visual Age C++)
HP aCC compiler (PA-RISC and Itanium)
PGCC, cxx and kcc on Linux
There were a couple more OSes detected in the configure script that were
lacking even the mkspec. Those have also been removed.
Of those, only hpuxi-acc and aix-xlc have been tested in the last 9
years, though only with Qt 4 and never tried with C++11 support. IRIX
was last tested over 10 years ago and PA-RISC is definitely not
supported due to its lack of atomic operations.
Support for HP-UXi and AIX is now only possible with GCC (assuming GCC
supports those). Support files for Oracle's Sun Studio compiler are left
behind, but its state is unknown.
Change-Id: I7814054a102a407d876ffffd14b69c796b97c972
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
these variables have no legitimate use when building qt itself, but have
great potential to wreak havoc.
Task-number: QTBUG-60016
Change-Id: I161837463443af82d48145e75952fa529212fe75
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>