summaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Make sure that -utf-8 flag only apply to MSVCAlexey Edelev2023-05-161-1/+1
| | | | | | | | | | | | | | | | INTERFACE scope propagates the '-utf-8' flag to the target dependencies. So if Qt is built using MSVC, but the depending targets use different compiler this flag will break the compilation. Guard the flag using genex. Amends e3cc2487ce63cae42d8054b38fdb54abe8545007 Pick-to: 6.5 Task-number: QTBUG-112737 Change-Id: Ie0576667108820dd61035debfc1fcc030ef3536a Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the -sysroot option from configureAmir Masoud Abdol2023-05-122-2/+8
| | | | | | | | | | | | The `-sysroot` does not have any effect, and it can be removed. I added a warning in case someone is still using it. [ChangeLog][configure] The -sysroot option was removed. Use CMAKE_SYSROOT or CMAKE_TOOLCHAIN_FILE instead. Task-number: QTBUG-112951 Change-Id: Ib180b891ca8228ef1ebf9be43f2f6b8b5b5b0ee7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Network: link directly to libresolv instead of dlopen()ing itAmir Masoud Abdol2023-05-111-0/+49
| | | | | | | | | | | | | | | | | | There's little need for us to dynamically load it. The reasons why that was necessary aren't in the public history (Qt 4.5 already had it[1]). I remember writing the code in 2007-2008, I just don't remember why. On modern Linux and FreeBSD, there's no libresolv.so any more and those symbols have been rolled up into libc.so. It's still necessary on Darwin systems, so this commit introduces WrapResolv. It also resolves the unity build issues relating to libresolv symbols. [1] https://code.qt.io/cgit/qt/qt.git/tree/src/network/kernel/qhostinfo_unix.cpp?h=v4.5.1 Task-number: QTBUG-109394 Change-Id: Ic5799e4d000b6c9395109e008780643bac52122b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make sure that -Zc:__cplusplus, and -permissive- only apply to MSVCAmir Masoud Abdol2023-05-111-1/+2
| | | | | | | | | | | | As described in the bug report, in cases where host Qt is built using MSVC, these flags may leak to user projects if they are set to be configured by a different compiler, e.g., Clang. Pick-to: 6.5 Fixes: QTBUG-112737 Change-Id: Iad922e24cc7e7f835e08ed37271dfbedc6e38dbe Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* headerscheck: enable exceptions for MSVCThiago Macieira2023-05-051-1/+1
| | | | | | | | | | | MSVC's own headers trigger the C4530 warning just by being included. C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\chrono(2206): error C2220: the following warning is treated as an error warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc Change-Id: Ieab617d69f3b4b54ab30fffd175c02c23f677d75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce QT_ALLOW_SYMLINK_IN_PATHS flagAmir Masoud Abdol2023-05-031-0/+2
| | | | | | | | | | | `QT_ALLOW_SYMLINK_IN_PATHS` disables the `qt_internal_check_if_path_has_symlinks` command. This allows people of Homebrew to get their build working without having to patch the entire function, as they currently do. Pick-to: 6.5 Change-Id: I4fed3ca497684364eaabbdbc44f1e148e3f28bd7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Do not use REALPATH when collecting Qt header filesAlexey Edelev2023-05-031-2/+0
| | | | | | | | | | | | | | | CMake doesn't resolve REALPATH for the non-existing files. This limitation blocks the use of REALPATH when collecting the generated module header files. The real path should be resolved by syncqt implicitly and CMake scripts should rely on ABSOLUTE paths only, which should be consistent for any files including the generated files. Task-number: QTBUG-113295 Pick-to: 6.5 Change-Id: I0219c7bf34ef6a6589c6d5fade4c2ed3f8036ef0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Remove duplicated syncqt arguments from the rsp fileAlexey Edelev2023-05-031-1/+0
| | | | | | | | | | syncqt_args is initialized with common_syncqt_arguments, so no need to append the same values one more time. Pick-to: 6.5 Change-Id: I1588ed438b7df0b0533ad3963ca96960dd5a8dbb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* CMake: Fix a typo in QtModuleHelpers.cmakeChristophe Marin2023-05-021-2/+2
| | | | | | | | | 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>
* CMake: Fully rebuild dirty configure-time executablesJoerg Bornemann2023-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add message if syncqt is crashed without any outputAlexey Edelev2023-04-261-0/+8
| | | | | | | | | | | | | 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>
* Introduce the qt_internal_project_setup macroAlexey Edelev2023-04-243-2/+12
| | | | | | | | | | | | 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>
* CMake: Store unsanitized plugin type names in module .json filesJoerg Bornemann2023-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add drive letter to source paths when calling qt-internal- scriptsAmir Masoud Abdol2023-04-141-0/+3
| | | | | | | | | | | | | 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>
* Disable objc_msgSend stubs in static libs to maintain Xcode < 14 compatTor Arne Vestbø2023-04-131-0/+15
| | | | | | | | | | | | | | 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>
* Make MODULE_ROOT AbsoluteAmir Masoud Abdol2023-04-121-1/+2
| | | | | | | | | | | | | | | 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>
* CMake: Fix linkage with lld 16.0Bernhard Rosenkränzer2023-04-112-14/+14
| | | | | | | | | | | | | | | | | | | 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>
* CMake: Fix setting Android SDK/NDK from environment variablesJoerg Bornemann2023-04-111-8/+4
| | | | | | | | | | | | | | 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>
* Add `-Wno-error=stringop-overread` to warnings_are_errors_flagsAmir Masoud Abdol2023-04-071-0/+5
| | | | | | | | | | | 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>
* Disable Unity Build for ExamplesAmir Masoud Abdol2023-04-061-0/+4
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I20999512e557db618c14e36d62317680bc17c43a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Indicate that export headers are autogeneratedFabian Kosmale2023-04-052-0/+4
| | | | | | | | | 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>
* Fix multi-thread GNU make buildAlexey Edelev2023-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace STREQUAL cases with variable checksAmir Masoud Abdol2023-04-044-18/+22
| | | | | | | | | | | | | 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>
* Add NO_UNITY_BUILD support to qt_internal_add_appAmir Masoud Abdol2023-04-031-1/+9
| | | | | | | Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Iefeb3b846cd889d6ae0aa786f9ae23fbfc811b64 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improvement to NO_UNITY_BUILD_SOURCES, and fix related bugsAmir Masoud Abdol2023-04-034-32/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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 cd12c1f33281452d478bb94744d76bead5c7363a Task-number: QTBUG-99238 Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Idb37937cf53e708425402c90f55bda8816e27f29 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid syncing and installation of non-module headersAlexey Edelev2023-04-031-4/+40
| | | | | | | | | | | | | | | 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>
* Add the missing list of the generatedHeaders to syncqt_all_argsAlexey Edelev2023-03-311-1/+1
| | | | | | | | | | | 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>
* iOS: request authorization before presenting image-pickerTimur Pocheptsov2023-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: add some docs for qt_find_packageAhmad Samir2023-03-281-0/+9
| | | | | | | | | | | | | | 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 6847a19e3edc76cce6ca0f0c25e520db591cedb9. Change-Id: I4a13d3c97a6172f504a57298c4b3edee30d21250 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Write target architecture into module info filesJoerg Bornemann2023-03-211-1/+2
| | | | | | | | | | 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>
* Trace: Make Q_TRACEPOINT publicAntti Määttä2023-03-211-2/+2
| | | | | | | | | | 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>
* CMake: Write Qt's namespace into module info JSON filesJoerg Bornemann2023-03-201-0/+4
| | | | | | | | | | 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>
* Centralize copyright information for QtKai Köhne2023-03-202-1/+7
| | | | | | | | | 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>
* Update Copyright year to 2023Kai Köhne2023-03-201-1/+1
| | | | | | Pick-to: 5.15 6.2 6.5 Change-Id: I8812bf2523ccb715407181aec6aebf2034c8ff84 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix an issue with passing NO_UNITY_BUILD_SOURCESAmir Masoud Abdol2023-03-156-15/+40
| | | | | | | | | | Amend 31518f1a4e3c4a7c77ae2e008e903a849ba75dd6 Amend 360293623094a31586981206e59c92aa6235163d Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ibb2fd881c02b6496f06b8b623fa6009358755a26 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve the internal handling of unity buildAmir Masoud Abdol2023-03-145-18/+28
| | | | | | | | | | | | | | | | | | | - 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>
* CMake: Pass CMAKE_EXE_LINKER_FLAGS to project-based try_compileAlexandru Croitor2023-03-141-0/+1
| | | | | | | | | | | | | | 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>
* Skip also QML tests in submodules when batching is onMikolaj Boc2023-03-131-1/+1
| | | | | | | | | | 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>
* Adapt qt_process_qlalr for test batchingMikolaj Boc2023-03-131-0/+9
| | | | | | | | | | 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>
* Do not batch standalone tests; add an option to batch themMikolaj Boc2023-03-131-8/+16
| | | | | | | | | | 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>
* Avoid error with test helper when test batch is missingMikolaj Boc2023-03-131-2/+2
| | | | | | | | | | | | | | | | 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>
* Make sure that all dependencies are found before creating tool targetsAlexey Edelev2023-03-131-5/+11
| | | | | | | | | | | | 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>
* SQL/IBASE: also search in firebird subdirChristian Ehrlicher2023-03-121-0/+1
| | | | | | | | | 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>
* Prefer the shared version of libzstd over the static oneLisandro Damián Nicanor Pérez Meyer2023-03-081-3/+3
| | | | | | | | 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>
* Make manual tests use the usual wasm_shell.htmlMikolaj Boc2023-03-071-0/+2
| | | | | | | | | | | | 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>
* Allow building with llvm-clang in macOSKuntal Majumder2023-03-061-1/+1
| | | | | | | | | | 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>
* CMake: Relax example dependencies to be per-repoAlexandru Croitor2023-03-062-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* wasm: set stack size to 5MB againMorten Sørvig2023-03-061-1/+2
| | | | | | | | | | | 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>
* Align qt_internal_add_manual_test with qt_internal_add_testAmir Masoud Abdol2023-02-281-107/+72
| | | | | | | | | | | | | 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>
* Skip non-qtbase tests on CoinMikolaj Boc2023-02-241-9/+16
| | | | | | | | | | 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>