Commit Graph

7 Commits

Author SHA1 Message Date
Amir Masoud Abdol
5c40cb0f1a Fix a bug in -redo where -redo was not considering new options
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>
2023-01-19 13:19:20 +01:00
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Lucie Gérard
fb1b20eab3 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 17:14:55 +02:00
Alexandru Croitor
0da123d67b CMake: Bump almost all cmake_minimum_required calls to 3.16
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.

Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-22 19:36:49 +02:00
Joerg Bornemann
57ad532e75 Fix our usage of CMake script mode in Windows configure
This is a preparation for adding the -help argument to
qt-configure-module.bat.

Consider the call
  qt-configure-module.bat path/to/qt-module -help
Internally, we called
  cmake ... -P .../QtWriteArgsFile.cmake path/to/qt-module -help
which was supposed to separate the arguments and write them into
config.opt.

However, passing arbitrary arguments after "-P script.cmake" only worked
by accident and is not supported.  As soon as arguments are passed that
are valid CMake arguments, like -help or -G, the CMake call would fail.

Now, we let configure.bat and qt-configure-module.bat write the
arguments as is into config.opt.in and let QtWriteArgsFile.cmake read
this file, separate the arguments and write config.opt.

Pick-to: 6.2
Task-number: QTBUG-95943
Change-Id: I80f298a2aaf55b0f79fed86320a055eb2d2b6faa
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-20 19:44:43 +02:00
Joerg Bornemann
9a50d62039 CMake: Fix Windows top-level configure.bat
We must write config.opt in the same directory we're reading it from.
We must not write the -top-level argument to config.opt.
This amends commit 2a29426e39.

Change-Id: I96da9094579fec29c290411677d6b538878399f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-03 13:06:14 +01:00
Joerg Bornemann
2a29426e39 CMake: Fix argument passing for configure.bat / qt-configure-module.bat
Passing arguments with equal signs was broken for configure.bat and
qt-configure-module.bat. An argument FOO=BAR was split at = and written
as
    FOO
    BAR
to config.opt, breaking every attempt of assigning CMake variables.

We must not iterate over %* in batch files to avoid splitting arguments
at equal signs. Instead, pass %* unmodified to a CMake script that
writes config.opt.

Fixes: QTBUG-88019
Change-Id: I7c743a206961d1ed168f2313f864905f6b345b49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-30 08:22:30 +01:00