Commit Graph

2070 Commits

Author SHA1 Message Date
Christophe Marin
b53bf18280 CMake: Fix a typo in QtModuleHelpers.cmake
Rename is_staitc_lib_during_static_qt_build to
is_static_lib_during_static_qt_build.

Pick-to: 6.5 6.2
Change-Id: Iec0f4d5d025e07a857a086e960eaf7b6fa2638a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-02 12:26:26 +02:00
Joerg Bornemann
aad3b1f063 CMake: Fully rebuild dirty configure-time executables
Problem: "ninja clean" does not fully clean the build directories of
configure-time executables (e.g. syncqt). This can lead to problems when
building with compiler and linker launchers: on configure time, the
launchers are not used (compare CMake issue #20762). After a "ninja
clean", the executable might be removed but the object files are still
there. This leads to a situation where the object files have been
created without the compiler launcher but are linked with the linker
launcher. We encountered a situation however, where the linker launcher
requires the usage of the compiler launcher.

The configure-time executable has a ${target}_build custom command that
runs "cmake --build" and creates a timestamp file to track when to build
the target. To circumvent the problem of stale object files we add the
"--clean-first" argument to that target to fully rebuild configure-time
executables if the timestamp file is out of date.

The performance this imposes is negligible, because
1. Those configure-time executables are seldom out of date.
2. They are supposed to be "tiny executables with system dependencies
only" anyway.

Pick-to: 6.5
Change-Id: I701f9089f5ad941ffdf235aeccc3119b68c4e3e3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-26 20:09:38 +02:00
Alexey Edelev
be4de03b37 Add message if syncqt is crashed without any output
If syncqt process crashed due to the incompatibility with the standard
library CMake doesn't produce any useful output. This adds the message
that will give short explanation and possible solutions to fix this
behavior.

Pick-to: 6.5
Task-number: QTBUG-112747
Change-Id: Ib51aec19e3fcacf07515a3d20d72f89753bcdc33
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-26 20:00:33 +02:00
Alexey Edelev
f3c10280f5 Introduce the qt_internal_project_setup macro
The macro sets the required CMake variables and policies and
should be called right after the
find_package(Qt6 COMPONENTS BuildInternals... call to make sure that
the subsequent code adopt all the required policies.

Pick-to: 6.5
Task-number: QTBUG-112685
Change-Id: I9f93f728ee4d8ae7743db9fffafa26025c76dcf2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-24 14:20:25 +02:00
Joerg Bornemann
24fe86ebe7 CMake: Store unsanitized plugin type names in module .json files
The module information .json gained a "plugin_types" key in 6.5.0.
Unfortunately, this contained the "sanitized" version of plugin types,
meaning dashes converted to underscores. For plugin types that contain
dashes, e.g. wayland-decoration-client, the file contained
wayland_decoration_client, which doesn't match its plugin directory
name.

Since "unsanitizing" plugin names is hard and "sanitizing" is easy, we
now store the unsanitized plugin names and burden the consumer of the
module .json files with the sanitation task.

[ChangeLog][CMake] The module information JSON files now contain the
unsanitized plugin types of a module, e.g. wayland-decoration-client
instead of wayland_decoration_client. Consumers of the module
information file must sanitize plugin types themselves if necessary.

Pick-to: 6.5
Fixes: QTBUG-112872
Change-Id: I09cc9406b360779087086707abee3d5219a24452
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-18 09:29:33 +02:00
Amir Masoud Abdol
389b3a131a Add drive letter to source paths when calling qt-internal- scripts
Like qt-configure-module.bat, when building with unity build, CMake
needs to know the full path of the source directory to be able to
correctly generate its `*_cxx.cxx` files. So far, this seems to only
affect Windows' LLVM/MinGW builds. By this patch, I make sure that we
pass the full path to CMake.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ida2da127ecba95856b6e0091936c471c2a116936
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-14 18:34:05 +02:00
Tor Arne Vestbø
c91ae574ed Disable objc_msgSend stubs in static libs to maintain Xcode < 14 compat
Xcode 14's Clang will emit objc_msgSend stubs by default, which ld from
earlier Xcode versions will fail to understand. Disable these stubs
explicitly for static libs, for as long as we support Xcode < 14.

 See https://github.com/llvm/llvm-project/issues/56034

Pick-to: 6.5
Fixes: QTBUG-112820
Change-Id: Id762873d61b9d147bf3eb6292297e7b80b7393e1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-13 19:37:55 +02:00
Amir Masoud Abdol
f4bf7982a6 Make MODULE_ROOT Absolute
In unity build, when calling qt-configure-module.bat, if we don't pass
an absolute path, CMake will not be able to resolve the header paths in
`*_cxx.cxx` unity headers. So far, this only happens on Windows/LLVM,
and it is probably an oversight on CMake side, as passing a path without
drive letter is perfectly fine in most cases, and CMake can handle it.
We don't need the TO_CMAKE_PATH, as `get_filename_component` also does
the transformation.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I474750af13291cbf1a46a12be5fc4a0f6e88accf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-12 20:44:11 +02:00
Bernhard Rosenkränzer
8f8be55c15 CMake: Fix linkage with lld 16.0
lld 16.0 is more picky about symbol versioning than previous versions
(and other linkers such as ld.bfd, gold or mold).
It now errors out if a symbol is versioned but not defined
(see 8796677de8900dc154aef45f8620c3f987a40291).

Outside of detecting support for symbol versioning (fixed by 462832),
this causes linking Qt6 libraries other than Qt6Core to fail because
their linker scripts try to add versioning to qt_version_tag, which is
defined in Qt6Core rather than the library being linked.

The obvious (and working) fix is to version qt_version_tag only where it is
defined (Qt6Core), but this is not what the original intent seems to be.

Task-number: QTBUG-111514
Change-Id: I963d417befb0f6b2260c57f059eeda1fe79200c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-11 15:19:22 +02:00
Joerg Bornemann
26f0657fee CMake: Fix setting Android SDK/NDK from environment variables
The checks for the environment variables ANDROID_SDK_ROOT and
ANDROID_NDK_ROOT were guarded by if(DEFINED) conditions. However, these
variables are *always* defined by the code that iterates over
__qt_toolchain_used_variables earlier in the toolchain file.

Change the existence checks into emptiness checks.

Pick-to: 6.5
Change-Id: I6c87f86068817e45dd2325359827c6fa4dae6279
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-04-11 14:37:36 +02:00
Amir Masoud Abdol
f5aa8317d0 Add -Wno-error=stringop-overread to warnings_are_errors_flags
Besides `stringop-overflow`, the `stringop-overread` is also buggy, and
it has some false positives. If not silenced, this will break the
unity build as several warnings are being emitted in qmetaobject.cpp,
etc.

Pick-to: 6.5
Change-Id: I708c81057c01d8d8fc9694c394c89602a2f6867b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-07 16:06:22 +02:00
Amir Masoud Abdol
684d301983 Disable Unity Build for Examples
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I20999512e557db618c14e36d62317680bc17c43a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-06 14:28:24 +01:00
Fabian Kosmale
63b350b2ed cmake: Indicate that export headers are autogenerated
This should help anyone stumbling upon them to realize that they should
not be modified directly.

Change-Id: Ib5218babdb8943646e222342f1040e5bba693076
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-05 18:25:06 +02:00
Alexey Edelev
db705d0794 Fix multi-thread GNU make build
Add the timestamp file creation for configure-time executables.
GNU make treats the custom command artifacts as 'dirty' when one of
the expected outputs is missing. It displays the following disclaimer

  Deleting primary custom command output ... because another output
  ... does not exist.

which leads to the configure-time executable rebuild. The removal
and rebuild is not in sync with the dependency lookup for other
targets(thanks to GNU make) so targets that depend on the
configure-time executables simply miss the dependency at build time.
This happens to syncqt and '_sync_headers' targets. So creating
the timestamp file at configure time indicates to GNU make that
there is no need of removing the syncqt executable and the build
process doesn't fail because of missing dependency.

Fixes: QTBUG-112018
Fixes: QTBUG-111163
Pick-to: 6.5
Change-Id: I6c1e8cae522104cf50d0376fa2b5653a6770f9ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 01:04:28 +02:00
Amir Masoud Abdol
da2b0307f8 Replace STREQUAL cases with variable checks
As I was investigating the NO_UNITY_BUILD_SOURCES issue, I realized that
we don't need to pass these quoted, especially now that we have moved
to `cmake_parse_arguments(PARSE_ARGV`, and we can check their existence
just by checking the `arg_*`, and that should be sufficient.

I also left a warning that we are aware of this.

Pick-to: 6.5
Change-Id: I4d939e80dc4671ea3ae9dc61516279f69ba2c5a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-04 08:55:02 +02:00
Amir Masoud Abdol
936c3bd224 Add NO_UNITY_BUILD support to qt_internal_add_app
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Iefeb3b846cd889d6ae0aa786f9ae23fbfc811b64
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-03 12:41:14 +02:00
Amir Masoud Abdol
ed85df8008 Improvement to NO_UNITY_BUILD_SOURCES, and fix related bugs
The source of the problem was in `qt_set_target_info_properties` which
was not able to process the NO_UNITY_BUILD_SOURCES, and therefore
leaking it into the `TARGET_COPYRIGHT`, ie., the last argument. So, I
decided to pass Unity Build arguments before them, and closer to
SOURCES, which is nicer to read, and avoid similar situation. And
I reverted the work around in the amend commit, and passing the
arguments normally.

This happens because we pass an unfiltered ${ARGN} from
qt_internal_add_executable to qt_set_target_info_properties and that the
current change is merely a workaround that ensures they get
circumstantially filtered out, because the NO_UNITY_BUILD_SOURCES option
appears before any of the first TARGET_ props.

Amend cd12c1f332

Task-number: QTBUG-99238
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Idb37937cf53e708425402c90f55bda8816e27f29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-03 10:41:13 +00:00
Alexey Edelev
4105ff809c Avoid syncing and installation of non-module headers
Add CMake rules to skip syncing and installation of header files
that are recognized as non-module. Previously these rules were in
syncqt.cpp only and CMake ignored them when creating the installation
rules. Now we skip any post processing for the header files that:
- are public and located in the '3rdparty' directory unless the module
  is the 3rdparty one
- are not a part of the module source tree unless they are generated
- have the _qt_non_module_header property set to TRUE

Pick-to: 6.5
Change-Id: I045cfc2b8074f0c086c975aae95f14845e3edfef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-03 12:41:13 +02:00
Alexey Edelev
f9594cefef Add the missing list of the generatedHeaders to syncqt_all_args
We need to pass the list of generated files to make the correct
filtering when generating the module master header. Otherwise
generated headers will endup in the module master header.

Pick-to: 6.5
Fixes: QTBUG-112458
Change-Id: Icd20fe5999db379d0eafbff7dad20765e1a96350
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-31 14:10:03 +02:00
Timur Pocheptsov
21a6c86979 iOS: request authorization before presenting image-picker
Right now, image picker view is shown first (it does
not require access to photos, since it's essentially
Photos app getting access to photos ...). Then, we use
AssetsLibrary to get asset for an url (using ALAssetsLibrarie's
-assetForURL method). This may trigger a permission-related alert, asking to:
   a. Select more photos or ...
   b. Allow access to all photos or ...
   c. Deny access.

Showing this alert _after_ picker has selected an image  makes little sense
(and probably was never intended this way anyway). Instead, we now use
Photos.framework to check the authorization and, if needed, we request
an authorization (when the current status is 'Nondetermined'). If authorization
is 'Granted' as a result, we show picker view and proceed as normal/before.

Pick-to: 6.5
Task-number: QTBUG-109120
Change-Id: I0acfd7b0476346360d75a5e37f5845aaf2d6e3e0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-28 18:37:36 +02:00
Ahmad Samir
396e6daea4 CMake: add some docs for qt_find_package
For -developer-buildS qt_find_package caches which packages were found
on the first configuration, to make the build system pick up a newly
added qt_find_package call one needs to follow one of the methods
that are now mentioned in the docs.

Hugely based on commit message from commit
6847a19e3e.

Change-Id: I4a13d3c97a6172f504a57298c4b3edee30d21250
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-28 15:45:24 +02:00
Joerg Bornemann
bd7e304d48 CMake: Write target architecture into module info files
Store the target architecture in the module information files under the
key 'built_with.architecture'.

Task-number: QTBUG-111158
Change-Id: Ida4cde3b15103773824a8d9d78f082540b806736
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-21 17:11:09 +01:00
Antti Määttä
4a9696aa05 Trace: Make Q_TRACEPOINT public
Allows sharing tracepoints between modules so that they can share one
trace group.

Pick-to: 6.5
Change-Id: I8de6da6beef02b34700cc2ecb1fad0e72a00b7e0
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-03-21 10:06:32 +02:00
Joerg Bornemann
656729c5b6 CMake: Write Qt's namespace into module info JSON files
If Qt was configure with QT_NAMESPACE set, store that in the module
information files under 'built_with.namespace'.

Task-number: QTBUG-111158
Change-Id: I273309cb263c64f801dbb7238440336d7afa635e
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-20 18:48:57 +01:00
Kai Köhne
003b084f38 Centralize copyright information for Qt
Maintain one central place - .cmake.conf - for information
about Qt's copyright.

Pick-to: 6.2 6.5
Change-Id: Ibcbce4313eba9660d459061b0ad00307e267b8f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-20 13:03:44 +01:00
Kai Köhne
70bc5dcb75 Update Copyright year to 2023
Pick-to: 5.15 6.2 6.5
Change-Id: I8812bf2523ccb715407181aec6aebf2034c8ff84
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-20 12:03:44 +00:00
Amir Masoud Abdol
cd12c1f332 Fix an issue with passing NO_UNITY_BUILD_SOURCES
Amend 31518f1a4e
Amend 3602936230

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ibb2fd881c02b6496f06b8b623fa6009358755a26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-15 18:18:01 +01:00
Amir Masoud Abdol
3602936230 Improve the internal handling of unity build
- Removed the NO_UNITY_BUILD argument from commands that disable it by
  default.
- Add a warning in case NO_UNITY_BUILD or NO_UNITY_BUILD_SOURCES is
  being used where it is already disabled, e.g., qt_internal_add_test
- Exclude all sources of a target from unity build if NO_UNITY_BUILD
  is set on the target. This sounds a bit harsh, but I have noticed that
  sometimes the same source file can be included somewhere else, and
  some unexpected collision may occur.
- qt_examples_build_end excludes all its examples from the unity build.
- qt_build_test now sets the CMAKE_UNITY_BUILD to OFF before configuring
  the tests, and restore its value when done.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ia42e7dd5a5bfb151db241deb639325720fd91eec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-14 17:28:44 +01:00
Alexandru Croitor
595ac662ed CMake: Pass CMAKE_EXE_LINKER_FLAGS to project-based try_compile
CMake does it for non-project-based try_compile calls if the
CMP0056 policy is set to NEW. That was introduced in CMake 3.2,
thus set it unconditionally.

The use case is to pick up custom -rpath-link paths when
cross-compiling.

Pick-to: 6.4 6.5
Change-Id: I726b90267dd46de116052b5b7f19b9354a568200
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-14 15:55:47 +01:00
Mikolaj Boc
d7f0677368 Skip also QML tests in submodules when batching is on
This should be handled later ideally, for now we should skip and
QML tests targets are still being produced, which leads to errors
on WASM.

Task-number: QTBUG-109786
Change-Id: I3d0d1f3115e324c7a0cb036e972226310294b216
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-13 22:26:08 +01:00
Mikolaj Boc
bd68df0905 Adapt qt_process_qlalr for test batching
Calling qt_process_qlalr with a skipped/batched target name results
in an error. Do the same as for other helper functions and handle
these two cases.

Task-number: QTBUG-109786
Change-Id: I774b148989a25d01bdf724e69a722aae132389ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-13 16:49:37 +01:00
Mikolaj Boc
5947c07717 Do not batch standalone tests; add an option to batch them
Tests generated with qt-cmake-standalone-test will now not be
batched by default. Defining the QT_BATCH_STANDALONE_TESTS
environment variable will make the build system batch them.

Fixes: QTBUG-111226
Change-Id: I9f01c662e22f8ffdd33e1c4d82619db0689fecc7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-13 16:12:28 +01:00
Mikolaj Boc
d87ba73d48 Avoid error with test helper when test batch is missing
qt_internal_add_test_helper will fail if a test batch is missing and
batching is enabled. It will now copy to the parent binary directory
as without batching for simplicity, as this happens when batched tests
are skipped.

One consequence could be that when the first test specified has
the NO_BATCH argument, this will incorrectly install the helper, but
helpers still need extra work to function properly, so for now we just
make it compile.

Task-number: QTBUG-109786
Change-Id: Ib307ae79799422c2a4102885aa007ef043835e50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-13 16:12:28 +01:00
Alexey Edelev
5e4f4816a8 Make sure that all dependencies are found before creating tool targets
The result of dependency lookup is not taken into account when
evaluating tool packages. Check for <ToolPackage>_FOUND before creating
the tool targets that belong to the tool package. Adjust the tool package
lookup that the dependencies always affect the lookup result even if
we avoided creating targets by setting QT_NO_CREATE_TARGETS.

Pick-to: 6.5 6.5.0
Change-Id: Ia95c9c71370becc639ed8a9db026aed2f93959b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-13 16:12:28 +01:00
Christian Ehrlicher
813b4cc2ea SQL/IBASE: also search in firebird subdir
Firebird has it's include files in <include>/firebird so we should also
search there.

Pick-to: 6.5 6.2
Change-Id: Ief57abbfd6973ab9077abc1a1a2791a62ce4102a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-12 11:36:53 +00:00
Lisandro Damián Nicanor Pérez Meyer
3f45905953 Prefer the shared version of libzstd over the static one
This is related to QTBUG-110978, but not a complete fix.

Task-number: QTBUG-110978
Change-Id: I91b757addde8213ba3d356a590f6e4cf68187c31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-08 18:16:29 -03:00
Mikolaj Boc
c6183cfc7b Make manual tests use the usual wasm_shell.html
Manual tests are supposed to display UI and be assessed manually, but
currently they use the auto test runner by mistake.
Use the normal wasm shell to fix this and make them work like usual
applications.

Fixes: QTBUG-111753
Change-Id: I9d3c0ad56e913b73737c5b72087e82980989d8b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-07 11:46:36 +01:00
Kuntal Majumder
05a7cbef5b Allow building with llvm-clang in macOS
Supressing the linking warnings on macOS are relevant when we are
using AppleClang and not upstream Clang.

The provided arguments do not apply to llvm-ar and llvm-ranlib.

Change-Id: I8b664c01802b47077eb0ab80dab7681ee0bfcaa9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-06 21:54:43 +01:00
Alexandru Croitor
a804ac3d88 CMake: Relax example dependencies to be per-repo
When doing a top-level build with ExternalProject examples, it doesn't
make sense to make qtbase examples depend on e.g. qtdeclarative
plugins. Instead the qtbase example should only depend on plugins
built in qtbase.

Create per-repo custom targets that depend on all plugins built within
that particular repo.

Create an additional per-repo target which depends on all
plugins built in that repo, as well as plugins from dependent repos.
Use the latter as a dependency for examples built as part of the
current repo.

Repo dependencies are parsed from dependencies.yaml.

Pick-to: 6.5
Fixes: QTBUG-110913
Change-Id: I149860cc549caf53271c9ea296eb7bac2a663715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-06 18:54:00 +01:00
Morten Sørvig
ba724a2ded wasm: set stack size to 5MB again
Recent Emscripten 3.1.27 reduces the stack size to 64KB,
which is way to small for Qt-based applications.

Restore the previous stack size (5 MB) by setting STACK_SIZE.

Change-Id: I6c25e31b32dc1d551fa423655fcef4891830bcd1
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-03-06 14:06:07 +00:00
Amir Masoud Abdol
b6bc4199ec Align qt_internal_add_manual_test with qt_internal_add_test
They now share their implementation. Manual tests can be created by
passing the MANUAL arguments to the qt_internal_add_test as well.

Pick-to: 6.5
Fixes: QTBUG-111382
Change-Id: I1c207b7e4a67526554df1ee43fe032bb20fc92fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-28 17:53:10 +01:00
Mikolaj Boc
6c12ea1d45 Skip non-qtbase tests on Coin
The previous attempt failed as target coin configuration doesn't
use superbuild. Skip the tests based on the TESTED_MODULE_COIN
environment variable

Task-number: QTBUG-109786
Change-Id: I0dbe6ff64ca4a2e81fef377865ef4e99b58c5eb2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-24 10:10:14 +00:00
Amir Masoud Abdol
a1782c1492 Fix a typo
Pick-to: 6.5
Change-Id: I13c344113c2e924dbe43995affe9b1aa3647f2aa
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-23 16:28:37 +01:00
Joerg Bornemann
4183768d9b CMake: Fix position independent code linker flags not being set
We set CMAKE_POSITION_INDEPENDENT_CODE to ON and require CMake 3.16.
This sets CMP0083 to NEW and should pass -fPIE to linker calls as well.

However, the PIE-enabling flag is not passed to the linker unless we
call check_pie_supported(). This behavior is documented in CMake's
CMP0083 documentation page.

[ChangeLog][CMake] Qt tools are now built with position independent code
even with Unix toolchains where this is not the default, for example
clang.

Pick-to: 6.5 6.4 6.2
Change-Id: I1d98e0ea7063a76e3fddc94d6555c6eaf14c7885
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-23 08:50:39 +01:00
Alexey Edelev
d51d7d4d5c Add support for evaluating genexes when exporting custom target props
Properties specified in EXPORT_PROPERTIES have their values exported
verbatim, without evaluating generator expression they might contain.
This limitation is removed by the introduced functions. They collect
properties that needs to be exported and evaluate generator
expressions inside the properties using file(GENERATE) before
exporting them. The functions generate the ExtraProperties.cmake
file that contains set_property calls with exported properties
and corresponding values.

Change-Id: If32c30a82a62e8bd48bb91f3df21ff2ad8d07243
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-21 22:42:01 +01:00
Alexey Edelev
0a27f4030e Revert "Avoid mapping BUILD_TESTING to QT_BUILD_TESTS"
This reverts commit e3ecabad22.

Reason for revert: This breaks the CTest internal switches. So it's better to disable testing directly in submodule.

Change-Id: Ia93dc3bb0a3a34021c8e2d6c3d292e3a4909bef5
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 21:41:41 +00:00
Alexey Edelev
d1d80d7be5 Add the QT_INTERNAL_CONFIGURE_FROM_IDE option
This switch should help switch off some time consuming operations
that make sense only whe configuring Qt project from IDE.

The switch is INTERNAL and depends on environment variables defined
by IDE application when running cmake:
- Qt Creator, detected by QTC_RUN environment variable
- CLion, detected by CLION_IDE environment variable
- Visual Studio Code, detected by VSCODE_CLI environment variable

Pick-to: 6.5
Change-Id: I44086376109a8af8ebb7ecd8bf64dc34f0631527
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 22:41:08 +01:00
Amir Masoud Abdol
6d0c774c51 Set 32 as the default batch size for unity build
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I4497d1abc85578649f03fc8ae4916f56e4f1f351
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-02-21 13:04:44 +01:00
Fredrik Ålund
0efd8854c4 A QtSql driver for Mimer SQL
The QtSql for Mimer SQL sqldriver makes it possible to work with the
Mimer SQL database on different plattforms. There are drivers for
several other databases in QtSql and a driver for Mimer SQL will
benefit many users.
To build the Mimer SQL driver, download Mimer SQL from
https://developer.mimer.com

[ChangeLog][QtSql]
Added a QtSql plugin to work with the Mimer SQL database

Fixes: QTBUG-111219
Change-Id: Id6ba5de4de01189d0516ffbfa89efcb0d013115f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-20 14:18:18 +00:00
Alexey Edelev
8d99866f17 Revert "Add the NO_CMAKE_PACKAGE_REGISTRY option forwarding to qt_find_package"
This reverts commit 545400addd.

Reason for revert: Adding NO_CMAKE_PACKAGE_REGISTRY doesn't resolve the initial issue. So reverting this change as redundant.

Change-Id: I284600d6f0e0f2408a7a8b31827251dad4c73eba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-17 16:59:59 +00:00