summaryrefslogtreecommitdiffstats
path: root/util/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Port the 'cross_compile' featureJoerg Bornemann2020-04-171-1/+1
| | | | | Change-Id: Iccd1d55e95797740a4a8689462ce9ab1e49a62c1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Remove mention of the system-xcb featureJoerg Bornemann2020-04-171-2/+1
| | | | | | | This feature was removed in commit 60588e1a. Change-Id: I061410dfab13a2210474014892d1bc828a5b21cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle automatic rpath embedding correctlyAlexandru Croitor2020-04-171-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using CMAKE_INSTALL_RPATH to embed an absolute path to prefix/libdir into all targets, use the more sophisticated aproach that qmake does. For certain targets (modules, plugins, tools) use relative rpaths. Otherwise embed absolute paths (examples, regular binaries). Installed tests currently have no rpaths. On certain platforms rpaths are not used (Windows, Android, iOS / uikit). Frameworks, app bundles and shallow bundles should also be handled correctly. Additional rpaths can be provided via QT_EXTRA_RPATHS variable (similar to the -R option that configure takes). Automatic embedding can be disabled either via QT_FEATURE_rpath=OFF or QT_DISABLE_RPATH=ON. Note that installed examples are not relocatable at the moment (due to always having an absolute path rpath), so this is a missing feature compared to qmake. This is due to missing information on where examples will be installed, so a relative rpath can not be computed. By default a Qt installation is relocatable, so there is no need to pass -DQT_EXTRA_RPATHS=. like Coin used to do with qmake e.g. -R . Relative rpaths will have the appropriate 'relative base' prefixed to them (e.g $ORIGIN on linux and @loader_path on darwin platforms). There is currently no support for other platforms that might have a different 'relative base' than the ones mentioned above. Any extra rpaths are saved to BuildInternalsExtra which are re-used when building other repositories. configurejson2cmake modified to include correct conditions for the rpath feature. It's very likely that we will need a new qt_add_internal_app() function for gui apps that are to be installed to prefix/bin. For example for Assistant from qttools. Currently such apps use qt_add_executable(). The distinction is necessary to make sure that relative rpaths are embedded into apps, but not executables (which tests are part of). Amends e835a6853b9c0fb7af32798ed8965de3adf0e15b Task-number: QTBUG-83497 Change-Id: I3510f63c0a59489741116cc8ec3ef6a0a7704f25 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add library mapping for xcb-fixesLeander Beernaert2020-04-151-0/+7
| | | | | Change-Id: Ida893674fa0782446acdac4ee5dfec4849d4605f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Update pro2cmake and friend to convert QtVirtualkeyboardLeander Beernaert2020-04-153-0/+6
| | | | | | | | | | | | Expand $$MODULE_BASE_DIR to ${QT_BUILD_DIR}. Add library mappings for Hunspell. Add test mappings for QtVirtualKeyboard regarding 3rdparty Hunspell and T9Write. Change-Id: Ief007456d0471cbcf9a03d819291edec5f63680f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake expand variables for qt_add_resource()Leander Beernaert2020-04-141-0/+12
| | | | | Change-Id: Ida1196645dabcb0c3aee210d9bc5ee5632a9ccc5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Add library mapping for QtHttpServerMikhail Svetkin2020-04-091-0/+6
| | | | | Change-Id: I3e12f164f7f6891c60c0d9da700b888850021e53 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle missing packages in project compile testsAlexandru Croitor2020-04-091-1/+7
| | | | | | | | | | | | | | | | | If a find_package() in a try_compile project doesn't find a package, and we then link against a non-existent target, the configuration failure of the compile test also fails the configuration of the project. To avoid that, separate library targets from non-targets, and make sure to only link against the targets if they exist. pro2cmake now outputs modified compile test project code which iterates over targets and non-target libraries, and links against them when needed. Change-Id: Ib0f4b5f07af13929c42d01a661df2cabdf9b926b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Handle finding of OpenSSL headers correctlyAlexandru Croitor2020-04-082-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Coin when provisioning for Android, we download and configure the OpenSSL package, but don't actually build it. This means that find_package(OpenSSL) can find the headers, but not the library, and thus the package is marked as not found. Previously the openssl_headers feature used the result of finding the OpenSSL package, which led to it being disabled in the above described Android case. Introduce 2 new find scripts FindWrapOpenSSL and FindWrapOpenSSLHeaders. FindWrapOpenSSLHeaders wraps FindOpenSSL, and checks if the headers were found, regardless of the OpenSSL_FOUND value, which can be used for implementing the openssl_headers feature. FindWrapOpenSSL uses FindWrapOpenSSLHeaders, and simply wraps the OpenSSL target if available. The find scripts also have to set CMAKE_FIND_ROOT_PATH for Android. Otherwise when someone passes in an OPENSSL_ROOT_DIR, its value will always be prepended to the Android sysroot, causing the package not to be found. Adjust the mapping in helper.py to use the targets created by these find scripts. This also replaces the openssl/nolink target. Adjust the projects and tests to use the new target names. Adjust the compile tests for dtls and oscp to use the WrapOpenSSLHeaders target, so that the features can be enabled even if the library is dlopen-ed (like on Android). Task-number: QTBUG-83371 Change-Id: I738600e5aafef47a57e1db070be40116ca8ab995 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: pro2cmake: Handle $$PWD in included .pri files correct-ishAlexandru Croitor2020-04-081-1/+12
| | | | | | | | | | | | | | | | Previously the $$PWD was evaluated within the including .pro file, which generated incorrect relative paths to source files. Now we use a horrible hack to evaluate keys ending with SOURCES and HEADERS. If such is a case, use a map_file transformer which will use the included scope, thus creating correct relative paths. Fixes projects in qtdeclarative like src/qmltypregistrar and qmllint. Checked that it doesn't break projects in qtdeclarative and qtbase. Change-Id: I21f1e4c638c2cf8d0f67e94e1a583ebc54c175a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Implement proper exclusion of tools including installingAlexandru Croitor2020-04-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous approach didn't work for prefix builds. While a target might be excluded from building via EXCLUDE_FROM_ALL property, when calling make install it would still try to install the target and thus fail. It's not possible to modify an install() command in a post-processing step, so we switch the semantics around. pro2cmake will now write a qt_exclude_tool_directories_from_default_target() call before adding subdirectories. This will set an internal variable with a list of the given subdirectories, which is checked by qt_add_executable. If the current source dir matches one of the given subdirectories, the EXCLUDE_FROM_ALL property is set both for the target and the qt_install() command. This should fix the failing Android prefix builds of qttools. Amends 622894f96e93d62147a28a6f37b7ee6a90d74042 Change-Id: Ia19323a2ef72a3fb9cb752ad2d4f2742269d11c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Port the 'static' featureJoerg Bornemann2020-04-061-1/+0
| | | | | | | | Now that we have the 'shared' feature implemented we can easily port the 'static' feature. Change-Id: Ia9b54b68d532d73c3d62d12a86c9e8b83e7909c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Reformat python scriptsAlexandru Croitor2020-04-062-9/+10
| | | | | | Change-Id: I1dfac318cdbbc4b4b7c76b113edca7db8f52f56b Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Allow specifiying custom output fileAlexandru Croitor2020-04-061-5/+24
| | | | | | Change-Id: If984d2bbc3e4b655a5eb58c68b282e3d13d51218 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: configurejson2cmake: Port precompile_header featureAlexandru Croitor2020-04-061-1/+3
| | | | | | | | | | | We don't need the test, we can just check the value of BUILD_WITH_PCH to know whether the feature is enabled. Regenerate configure.cmake files. Change-Id: I5691a22af2913bc398f99825e0c41cf2daf5a587 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Qt Core5Compat to the library mappingSona Kurazyan2020-04-031-0/+1
| | | | | | Change-Id: Iad613c75705b09f7ae043cff417b0fcf3f5dd946 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Skip conversion of doc snippetsAlexandru Croitor2020-04-031-0/+5
| | | | | | | | Most of them are hand-written. Change-Id: Ia3d83cdc9e279420c9b4700993b428e10cf8fb22 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make sure that the library config.test is used for assimpAlexandru Croitor2020-04-031-1/+9
| | | | | | Change-Id: Ia5b2a2ffca2dda460a323fd3f564c548be84c0aa Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle standalone config.tests in configure libraries sectionAlexandru Croitor2020-04-032-16/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some library entries in configure.json have a test entry. An example is assimp in qtquick3d. qmake tries to find the library via the sources section, and then tries to compile the test found in config.tests/assimp/assimp.pro while automagically passing it the include and link flags it found for assimp. We didn't handle that in CMake, and now we kind of do. configurejson2cmake will now create a corresponding qt_config_compile_test call where it will pass a list of packages and libraries to find and link against. pro2cmake will in turn generate new code for the standalone config.test project. This code will iterate over packages that need to be found (like WrapAssimp) and then link against a list of passed-in targets. In this way the config.test/assimp/main.cpp file can successfully use assimp code (due to propagated include headers). qt_config_compile_test is augmented to take a new PACKAGES argument, with an example as follows PACKAGES PACKAGE Foo 6 COMPONENTS Bar PACKAGE Baz REQUIRED The arguments will be parsed and passed to the try_compile project, to call find_package() on them. We also need to pass the C/C++ standard values to the try_compile project, as well as other try_compile specific flags, like the toolchain, as given by qt_get_platform_try_compile_vars(). Change-Id: I4a3f76c75309c70c78e580b80114b33870b2cf79 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow excluding tools and apps from the default 'all' targetAlexandru Croitor2020-04-022-0/+26
| | | | | | | | | | | | | | | | | | | | | | | Qt uses the qtNomakeTools() function to mark a directory which will not be built as part of the default target. This is especially important when cross-compiling (to iOS for example) because the build process might fail. The condition for not building these "GUI tool sub-directory projects" is the absence of the "tools" value in qmake's QT_BUILD_PARTS variable. Introduce a QT_NO_MAKE_TOOLS CMake variable. If the value is true, it's equivalent to "tools" not being present in QT_BUILD_PARTS. Introduce qt_exclude_tool_directories_from_default_target(). It's the qmake counter part to qtNomakeTools(). Teach pro2cmake to generate it where appropriate. Change-Id: If2e5958d91847ab139af0e452608510286e73fa0 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Report which qt parts will be built by defaultAlexandru Croitor2020-04-021-0/+3
| | | | | | | | | Like libs, tools, examples, tests. Built by default means they are part of the default make / ninja target. Change-Id: I304e5724fc5dbd39626e9d589a6e1e92a4dd7882 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Define QT_STATIC for static buildsJoerg Bornemann2020-04-011-1/+16
| | | | | | | | | | QT_STATIC must be defined for static builds to have the right import/export symbol macros defined. Originally, this macro is wrapped in a condition. That's why we extend qt_feature_definition to be able to write a prerequisite to qconfig.h. Change-Id: I610e60acc7f5bdc031eff6d53a76e0b229a5c8c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'rpath' featureJoerg Bornemann2020-04-011-2/+5
| | | | | | | | This is needed for qmake mixing. Change-Id: I368169606606a8de4dc8f2db5b98660a0a2fa349 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* CMake: Fix exception in pro2cmake about missing v1 apiLeander Beernaert2020-03-251-0/+1
| | | | | | | | This patch silences the exception about missing v1 api entry for the qt_add_3rdparty_library() function. Change-Id: I74a473ed1c063b13f0a9ca64dcb568b8f8b27235 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add support for bundled SQLite libraryLeander Beernaert2020-03-253-4/+4
| | | | | Change-Id: I4d3f6e3bf04eb2fcf337e2c5dbc04b6e6f8ebe0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configuration of FEATURE_JPEGLeander Beernaert2020-03-251-1/+0
| | | | | | | | Without this patch JPEG support is always disabled, even though we can build it from 3rdparty sources. Change-Id: I9e619f0ca8ec3ca3e7c58981bb6af9b33426a029 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: "Port" the c89, c99 and c11 featuresJoerg Bornemann2020-03-231-3/+0
| | | | | | | | We can ignore the tests for those features and directly ask CMake whether the compiler supports the respective language version. Change-Id: I31cd35493443fea0c6d0b0a5e641768c3bcbe736 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Consider system-assimp for conditionsAlexandru Croitor2020-03-231-0/+1
| | | | | | Change-Id: Idee55dfdd88b04792dc1485a818ab41218fa2707 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Skip inclusion of selfcover.priLeander Beernaert2020-03-191-0/+4
| | | | | | | | | Do not process selfcover.pri in the conversion as the output requires a lot of special case fixs ups. Change-Id: Iebee484db887973369b5604344a6d486f4bea20b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Don't use GUI for tests that use QT += testlib-privateAlexandru Croitor2020-03-191-3/+3
| | | | | | Change-Id: I90cac19928d6e6e30214a6480a5855479a8d4d77 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: pro2cmake: Add alternative package installation instructionsMitch Curtis2020-03-181-0/+6
| | | | | | | | | | | I kept getting Ignoring pytest: markers 'python_version >= "3.7"' don't match your environment when using the pip command, but this alternative worked. Change-Id: Ibfc7f36de04153d2247f8f62bd129b0c0c723bf2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Handle javascript files not present in qmldirAlexandru Croitor2020-03-171-0/+5
| | | | | | | | | | If a file is present in a QML_FILES variable inside a qmake .pro file, but is not listed in the static qmldir file, mark the file so no qmldir entry created for it. Change-Id: I3ec77b6eedf70ea9124bf7f447ee3477204bc4f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake: Handle system tiff featureAlexandru Croitor2020-03-171-0/+1
| | | | | | | | Don't exclude it, because we use it in qtimageformats. Change-Id: I0004830580dd9711cf7a5bd934ecd5a7f9036800 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-166-29/+29
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-165-20/+20
| | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake handle ${QT_SOURCE_TREE} for include statementsLeander Beernaert2020-03-121-0/+7
| | | | | | | | | | Replace ${QT_SOURCE_TREE} with top level project directory when encountered in include statements. This is required to parse tests/auto/testlib/selftests/test/test.pro. Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Reformat the python scripts using blackAlexandru Croitor2020-03-123-29/+48
| | | | | | Change-Id: I1e2eba46eb7c9dfefd267be91790be7898634c3a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Handle LIBS_SUFFIX define correctlyAlexandru Croitor2020-03-121-0/+12
| | | | | | | | | Matches the LIBS_SUFFIX define we use in Android conditions and replaces it with a sane amount of escaped characters. Change-Id: I7d870f992c70b105dd80b6fa94f87d3fa5644006 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Fix opengles condition substitutionAlexandru Croitor2020-03-101-1/+1
| | | | | | | | Missing parenthesis caused wrong condiiton simplification in scopes. Change-Id: Ia2a1a97f4da36b185631a2a3c7855ae01595b0f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove old 3rdparty mechanism for harfbuzz-non-ngAlexandru Croitor2020-03-101-1/+0
| | | | | | Change-Id: I37c1e561ac83c51a06aae50ccb176094785d52f5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove old 3rdparty mechanism for double conversionAlexandru Croitor2020-03-103-4/+2
| | | | | | Change-Id: I2b20d4d9d95a1f7f59bc506046a1ebc20eb305f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add python version requirement note to pro2cmakeAlexandru Croitor2020-03-091-0/+3
| | | | | | Change-Id: Iccaf61e19fb7257ed21f656c287976d7d778ed1c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Disable framework builds on macOS when target config is DebugAlexandru Croitor2020-03-091-1/+1
| | | | | | | | | | | | | | This prevents Coin from trying to automatically enable the framework feature when no configuration is specified on the command line. By default if no configuration is specified, and there's a .git subfolder, "Debug" will be the chosen config, and that would conflict with the framework feature, which would cause configuration to fail. Change-Id: Ia9db3e8178794737692307b4662a2e77cc574ccd Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix handling of QML_IMPORT_VERSION in pro2cmakeAlexandru Croitor2020-03-091-21/+27
| | | | | | Change-Id: Iaab6796204a6bb13b3d061d2589b2aebd4f342a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* CMake: Port most of the configure summary supportAlexandru Croitor2020-03-091-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | Teaches configurejson2cmake about summaries / reports, so things like enabled features, configure sections, notes, etc. Add relevant CMake API for adding summary sections and entries, as well as configure reports. The commands record the passed data, and the data is later evaluated when the summary needs to be printed. This is needed, to ensure that all features are evaluated by the time the summary is printed. Some report and summary entries are not generated if they mention a feature that is explicitly exclduded by configurejson2cmake's feature mapping dictionary. This is to prevent CMake from failing at configure time when trying to evaluate an unknown feature. We should re-enable these in the future. A few custom report types are skipped by configurejson2cmake (like values of qmake CONFIG or buildParts). These will have to be addressed a case-by-case basis if still needed. Change-Id: I95d74ce34734d347681905f15a781f64b5bd5edc Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Port the 'separate_debug_info' featureJoerg Bornemann2020-03-061-2/+0
| | | | | | | | | | | | | | | For this, we have to uninline the separate_debug_info configure test, because supporting the conversion of this in configurejson2cmake is not worth the hassle. Separate debug information can be turned on for a target by calling the function qt_enable_separate_debug_info. For Qt's shared libraries and tools separate debug information is generated if the 'separate_debug_info' feature is manually turned on. Change-Id: Ic2ffc15efef3794dc0aa42f3d853ef6d651a751c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix condition of the 'debug' featureJoerg Bornemann2020-03-061-1/+1
| | | | | | | | For the moment, in feature conditions that use STREQUAL, the lhs must be a variable. Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle configure.json library testsLeander Beernaert2020-03-062-118/+197
| | | | | | | | | | | | | | | | | | | This patch updates configurejson2cmake.py to generate compile tests for library entries. The test also support the inherit keyword, which is currently limited to one level of inheritance. LibraryMapping has been extended with a test_library_overwrite as a means to overwrite the mapped library during a compile test. Certain tests such as openssl_headers form src/network are mapped with *_nolink libraries which do not exist when the test is run. Failing to do so will cause the test to run as it is skipped when the library target isn't found. To avoid redundant checks, the library tests need to be opt in by setting run_library_test to True on an instance of LibraryMapping. Change-Id: I607b24eda389fa67afad301c616e31bb7ab38d20 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Fix non-inline compile testsJoerg Bornemann2020-03-051-13/+10
| | | | | | | | | | If there's no test dir set, use "config.tests" as default value, and perform the check for the existence of CMakeLists.txt in configurejson2cmake, not the configure.cmake file. Change-Id: I8d3be8f2b68767c7592665c374022353c2dc6c57 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Fix compile tests without a "test" entryJoerg Bornemann2020-03-051-1/+4
| | | | | | | | | Set the default value of the "test" entry to the test's name like the qmake-based configure does. Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>