summaryrefslogtreecommitdiffstats
path: root/qmake
Commit message (Collapse)AuthorAgeFilesLines
* QMake: replace a Q_ASSERT() with a Q_UNREACHABLE()Marc Mutz2022-01-251-1/+2
| | | | | | | | | | | | | | In release mode, the Q_ASSERT() is a no-op, and Clang rightfully pointed out that, in that case, the bool ok variable will be used uninitialized. Fix by using Q_UNREACHABLE(), which has an effect in both debug and release builds. Pick-to: 6.3 6.2 5.15 Change-Id: I33480aabe1c5233d1caddf9404f475ca9fcb8eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix wrong QT_HOST_* values when qt.conf is presentJoerg Bornemann2022-01-121-2/+2
| | | | | | | | | | | | | | | | When a qt.conf was present, QT_HOST_* variables got a wrong default value. For example, QT_HOST_BINS would end with /bin/bin. We must not provide the defaults via QSettings::value(_, defaultValue). The assignment of the default value is done in QMakeLibraryInfo::rawLocation() separately after retrieving the value. This amends commit 04ec14105ec41a67fe4d53a1962c9d68c5fd8715. Pick-to: 6.3 Fixes: QTBUG-99656 Change-Id: I43431664e93ab40417a5432b03e7eb38ae21bad8 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* qmake: Print error and exit if a response file cannot be createdJoerg Bornemann2022-01-081-2/+8
| | | | | | | | | | | | This is always an error, and we should not silently return an empty string and pretend that everything is in order. Drive-by change: Add a comment stating what createResponseFile() returns. Pick-to: 6.3 Change-Id: I4ee940cfac826c7ae5d15e977b692f1368ab29ea Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* qmake/MinGW: Fix linking target name with whitespaceJoerg Bornemann2022-01-081-1/+1
| | | | | | | | | | | | | | | | | | When having a TARGET value that contains whitespace, linking would fail with MinGW. This was, because the function createResponseFile stitched together a file name like this: objectScript."Target Name".Release The inner double quotes make the file name invalid. Fix this by retrieving QMAKE_ORIG_TARGET with the var() method instead of fileVar(). The latter quotes the return value if it contains spaces. Pick-to: 5.15 6.2 6.3 Fixes: QTBUG-99522 Change-Id: Ieb7dcf3fbbd8a75de5a9b9a6beadb2170dddf35d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Mention how to interrupt/continue qmake loopsJoerg Bornemann2022-01-081-0/+4
| | | | | | | Fixes: QTBUG-99559 Pick-to: 6.3 Change-Id: Ib88bc0f93d7c0d6b9bf9a342410395f5a79675e5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmake/Xcode: Mark "Qt Preprocess" build phase as always out of dateJoerg Bornemann2021-12-091-0/+1
| | | | | | | | | | | | | | | | This build phase executes the qt_preprocess.mak makefile from Xcode and should be triggered whenever any input of any rule in this makefile is out of date. It was not triggered when a file that's referenced in a .qrc file was changed. The Xcode project lacks those files as rule input, but the makefile itself has its inputs correctly set up, and can be triggered always. Pick-to: 6.2 5.15 Fixes: QTBUG-94995 Change-Id: Ida1349039bd6f23a300a610ecbde96f7cd35edb6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix size_t / int conversion warnings in qmakeKai Köhne2021-12-021-2/+2
| | | | | | | | | | | Fixes qtbase\qmake\generators\makefiledeps.cpp(985): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data qtbase\qmake\generators\makefiledeps.cpp(986): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Pick-to: 6.2 Change-Id: I7c6b4f36dc383db420c10d674666d58dbf29d2dd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Long live Q_GADGET_EXPORT!Marc Mutz2021-11-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | Like Q_NAMESPACE_EXPORT for Q_NAMESPACE, this variant of Q_GADGET allows passing an export macro. This is useful to avoid exporting the whole class just to get the staticMetaObject hidden therein exported. Before anyone asks: No, we don't need Q_OBJECT_EXPORT, because QObject subclasses, being polymorphic, always need to have a class-level export macro (to export their vtable), but while that technique also works for value classes (the Q_GADGET audience), it is not desirable for them, because it makes inline functions exported in Windows debug builds, which is not what we want, because it needlessly restricts what you can to with the inline functions (e.g. remove). [ChangeLog][QtCore] Added the Q_GADGET_EXPORT macro, which is like Q_GADGET, but allows passing an export macro (like Q_NAMESPACE_EXPORT for Q_NAMESPACE). Fixes: QTBUG-55458 Change-Id: I546297de1e8aa45d83381991bcd3fbca61e1eef0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* qmake: use even fewer magic numbersMarc Mutz2021-11-261-28/+29
| | | | | | | | | | | | | De-unroll the loop over the "interesting" keyword ignore comments by using the existing array of their names. Replace magic numbers by strlen() calls. Use local starts_with() instead of strncmp() when comparing with fixed-size constant string literals, to avoid repeating the fixed string's lengths for the third argument of strncmp(). Task-number: QTBUG-55458 Change-Id: If458aced382948fb719d984702857fb2171c87ee Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qmake: don't use magic numbersMarc Mutz2021-11-241-7/+15
| | | | | | | | Use a local enum to enumerate the different "interesting" keywords. Task-number: QTBUG-55458 Change-Id: I30a6336072d3184b720d8c016f199572dba87a81 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QtBase: replace windows.h with qt_windows.hYuhang Zhao2021-11-234-4/+4
| | | | | | | | | | We have some special handling in qt_windows.h, use it instead of the original windows.h Change-Id: I12fa45b09d3f2aad355573dce45861d7d28e1d77 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move the 'qmake' feature to src/tools/configure.cmakeJoerg Bornemann2021-11-192-16/+0
| | | | | | | | This allows us to present 'qmake' in the tool-related section of the configure summary. Change-Id: I897dec23cb0608706ec01d9b91283dbce92b293f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change qt.conf key Qml2Imports to QmlImportsJoerg Bornemann2021-11-191-13/+14
| | | | | | | | | | | | | [ChangeLog][qt.conf] The key Paths/Qml2Imports has been renamed to Paths/QmlImports. For backwards-compatibility, Paths/Qml2Imports is still accepted and acts as default value for when Paths/QmlImports is not present. Fixes: QTBUG-98335 Change-Id: If7ffedd281eb8a87e8ab1a2b69a823e615c33541 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-11-111-0/+3
| | | | | | | | | | In addition, added the missing warninglimit entry to a few doc configs. Change-Id: I51b9d2ad66123a2a9673a3b42870662641375e6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qmake: Introduce the variable MSVC_TOOLSET_VERJoerg Bornemann2021-11-101-17/+1
| | | | | | | | | | | | | ...which represents the version of the MSVC platform toolset. This variable is used to set the platform toolset version in .vcxproj files. Before, the platform toolset version was determined in qmake's C++ code. Now, it's set next to where MSVC_VER is set in common mkspecs .conf files. This will simplify supporting new Visual Studio versions in the future. Change-Id: If78c921f93c6378829746d617c7e7d312174257e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Support Visual Studio 2022Joerg Bornemann2021-11-103-1/+14
| | | | | | | | | | | | Extend the detection of the MSCV_VER variable and make VS 2022 known to the vcxproj generator. [ChangeLog][qmake] Added support for Visual Studio 2022. Pick-to: 6.2 5.15 Fixes: QTBUG-97975 Change-Id: Id2c0a0b7800f721e9e34189f0a40ba4830283578 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake/vcxproj: Fix "CONFIG += combine" extra compilersJoerg Bornemann2021-10-251-26/+58
| | | | | | | | | | | | | | | | | | | | | Extra compilers with "CONFIG += combine" were broken for qmake's vcxproj generator since forever. Usually, extra compilers are handled by attaching the Custom Build Tool to the input file. This is not possible for combine extra compilers, because they map multiple inputs to one output. We cannot attach the Custom Build Tool to the output either, because this would result in circular dependency errors (output trying to create output itself). To fix this, we create a custom build tool fake file (.cbt) for the output and attach the Custom Build Tool there. This is the same trick we do for regular extra compilers that have C++ sources as input (e.g. the one that generates moc_predefs.h). Pick-to: 6.2 5.15 Fixes: QTBUG-94806 Change-Id: Ib808a43fead737df91b89a1ac5e180aeae37efae Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Make some debug code actually compilableJoerg Bornemann2021-10-251-1/+1
| | | | | Change-Id: Ia57b0d83ba3bf005d7d19e7958bb7131c7dc50b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake/vcxproj: Fix malformed <Message> tagsJoerg Bornemann2021-10-251-0/+1
| | | | | | | | | | | | | | Extra compilers and the command set to "\n" would result in malformed <Message> tags in vcxproj files. Those tags are used to display the name of the extra compiler when building. Setting the extra compiler's command to "\n" is a common trick to force the creation of the rule. Make sure to trim the command name that is created from the extra compiler's command to avoid such new-line-only bogus message tags. Pick-to: 6.2 5.15 Change-Id: I1bae28ed14c438d777f96280c6b2cf5ca315b51c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Skip unnecessary commands when cross-building toolsJoerg Bornemann2021-09-271-0/+1
| | | | | | | | | | | | | | | Introduce a new macro qt_internal_return_unless_building_tools which simply calls return() if tools are not built. This macro is supposed to be called after qt_internal_add_tool(). Using this macro avoids having to special-case code for when qt_internal_add_tool() creates imported targets in cross-builds. Adjust pro2cmake accordingly. Task-number: QTBUG-85084 Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove fatuously true or false QT_VERSION checksEdward Welbourne2021-09-231-12/+5
| | | | | | | | | QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix broken linksVenugopal Shivashankar2021-09-171-5/+2
| | | | | | | Task-number: QTBUG-96569 Pick-to: 6.2 6.2.0 Change-Id: If7e951c3df72a87a04e802a5eadbc01c4d934765 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qmake/xcode: Do not create OBJECTS_DIRJoerg Bornemann2021-09-104-0/+23
| | | | | | | | | | | | | If we create OBJECTS_DIR at qmake time, Xcode will not consider this directory as created by the build system, and "xcodebuild --clean" will fail. Prevent qmake from creating that directory in the Xcode generator. Pick-to: 5.15 6.2 Fixes: QTBUG-96305 Change-Id: I874bf34a4289ce5f2d3e2ce070ffbe56d5368861 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Remove unsupported customFiltersKai Köhne2021-09-031-3/+0
| | | | | | | | | | | customFilters defined in .qdocconf are not supported anymore by Qt Assistant since Qt 5.13. Therefore remove them from all .qdocconf files, also to avoid cargo-culting them to new help modules. Task-number: QTBUG-95987 Change-Id: I664391460637d2e859348da0338e1a4a3ee9f570 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update Android default SDK from 29 to 30Juha Vuolle2021-08-271-1/+1
| | | | | | | | | | | By the time of Qt 6.2 release all new apps targeting Play store must target API level 30 (Android 11) or above (starting in 08/2021 for new apps and 11/2021 for existing apps' updates). Pick-to: 6.2 5.15 Task-number: QTBUG-94451 Change-Id: Id7fa2fd62899a7259e365c917292c6c3ac0d2b0d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* qmake: Add support for C17/C18Joerg Bornemann2021-08-261-0/+5
| | | | | | | | | | | | Make it possible to select the C17/C18 standard with CONFIG += c17 or CONFIG += c18 Pick-to: 6.2 5.15 Fixes: QTBUG-96026 Change-Id: I719d22366c3efda009118d58ead173a25ed285c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake/vcxproj: Read C language standard from QMAKE_CFLAGSJoerg Bornemann2021-08-261-0/+16
| | | | | | | | | | | | | | | The vcxproj generator completely ignored QMAKE_CFLAGS and did only read QMAKE_CXXFLAGS. The msbuild-internal "cl compiler tool" contains the flags for both, C and C++. It is to risky to take all QMAKE_CFLAGS into account for the "cl compiler tool", because this might collide with what is specified in QMAKE_CXXFLAGS. Therefore, we only read the /std:... compiler option from QMAKE_CFLAGS and set the LanguageStandard_C flag in the msbuild file. Pick-to: 6.2 5.15 Task-number: QTBUG-89296 Change-Id: I885061802c1350b293a7868d4c9a9367d30e2380 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake/vcxproj generator: Handle C standard compiler flagsJoerg Bornemann2021-08-263-6/+37
| | | | | | | | | | | | | Handle the compiler flags /std:c11 and /std:c17 and turn them into the values stdc11 and stc17 for the LanguageStandard_C tag. Drive-by change: Add /std:c++20 to the list of known C++ standard options. Pick-to: 6.2 5.15 Task-number: QTBUG-89296 Change-Id: Ia575fff611bdf795406db84bd34057d008c8a383 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Recognize MSVC 16.x as VS 2019 in the VS project generatorJoerg Bornemann2021-08-261-27/+31
| | | | | | | | | | | | | | In a subsequent comment we will set the qmake variable MSVC_VER to 16.8 to check for the availability of certain compiler flags that were introduced in that compiler version. The old code compared exact version strings. With this patch we're checking version ranges instead and handle MSVC_VER 16.x as VS 2019. Pick-to: 6.2 5.15 Task-number: QTBUG-89296 Change-Id: I9ea24a66f68a342a72f5c2a285bafacb8786661b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Note that qmake's CONFIG values are case-sensitiveJoerg Bornemann2021-08-181-0/+2
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-95827 Change-Id: Ie7b373c547b04a0ebe0b4b93dd0ec0c12e445b2e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix framework dependencies in .la filesJoerg Bornemann2021-08-171-0/+28
| | | | | | | | | | "-framework Foo" arguments must be placed in the inherited_linker_flags variables instead of dependency_libs. Pick-to: 5.15 Fixes: QTBUG-2390 Change-Id: Idec4115533ed1f86f44db64931fa64cadeeb4572 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid to call _qt_internal_set_up_static_runtime_library() twiceLi Xinwei2021-08-031-2/+1
| | | | | | Pick-to: 6.2 Change-Id: I28985470b3e0b88befbbd2d62a027670d7d6c822 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* testlib: Update a few remaining instances of the deprecated -xunitxml formatTor Arne Vestbø2021-07-291-3/+3
| | | | | | | | The format was renamed in 27db9e458cef512fca3a6b5c9ebbcda7a8172428. Pick-to: 6.2 Change-Id: I53975c7467d8768dc9dc9ac2d89c42eefa12e22f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDirIterator: add nextFileInfo()Marc Mutz2021-07-282-4/+2
| | | | | | | | | | | | | | | | | | | | | | | Before this change, next() was the only way to advance the iterator, whether the caller was ultimately interested in just the filePath() (good) or not (bad luck, had to call .fileInfo()). Add a new function, nextFileInfo(), with returns fileInfo() instead. Incidentally, the returned object has already been constructed as part of advance()ing the iterator, so the new function is faster than next() even if the result is ignored, because we're not calculating a QString result the caller may not be interested in. Use the new function around the code. Fix a couple of cases of next(); fileInfo().filePath() (just use next()'s return value) as a drive-by. [ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like next(), but returns fileInfo() instead of filePath(). Change-Id: I601220575961169b44139fc55b9eae6c3197afb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix link errors in qmake manualNico Vertriest2021-07-281-4/+5
| | | | | | | | | | | | - Replaced # with / after link prefix "Qt for macOS" - added definite article - punctuation issue - Added prefix "Qt for macOS/" to one link, and changed "macOS Version Dependencies" to "Supported Versions" Fixes: QTBUG-90662 Change-Id: Ib2e48ee477e8d34fece64d6dea1f86fe73f09478 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDuplicateTracker: accept the number of elements to reserve as a ctor argumentMarc Mutz2021-07-141-2/+1
| | | | | | | | | | | | This prevents us from first reserve()ing Prealloc elements, and then possibly reserve()ing a larger number, which leaves the first bucket list's memory unused. Consequently, deprecate reserve(). Change-Id: Ifc0a5a021097f4589557e7b5e45d9d0892797ade Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QT_HOST_DATA for builds setting INSTALL_MKSPECSDIRJoerg Bornemann2021-06-232-1/+14
| | | | | | | | | | | | | | | | | | | | In a Qt build that was configured with INSTALL_MKSPECSDIR set to something different than INSTALL_DATADIR, the qmake property QT_HOST_DATA was wrong. Consequently, mkspecs could not be loaded, rendering qmake dysfunctional. The reason was that we considered every QT_HOST_xxx property to have the same value as QT_INSTALL_xxx in a non-cross build. This is not true for QT_HOST_DATA, because users might want to set INSTALL_DATADIR to "foo" but INSTALL_MKSPECSDIR to "bar/mkspecs". Move the unused determination of the host data dir to the QtLibraryInfo lib and handle QT_HOST_DATA specially. Fixes: QTBUG-94591 Pick-to: 6.2 Change-Id: I2c44cda8405ff1d14391254fcd1d9b1361cb5855 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: fix MSVC build error when QT_FEATURE_static_runtime is ONLi Xinwei2021-05-191-0/+1
| | | | | | | | | error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'. Change-Id: I1422bdc680a066f0736c3e28cc6beafd2461db88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Follow the generic logic of QLibraryInfo when computing QT_HOST_PREFIXAlexey Edelev2021-05-181-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | After the discussion we concluded that QT_HOST_PREFIX should not completely replicate the QT_INSTALL_PREFIX behavior. So this patch implements the following logic if qt.conf is provided: 1. Prefix is not set a. If HostPrefix is not specified, then QT_HOST_PREFIX will be set to the folder containing qt.conf. b. If HostPrefix is specified and is relative, then QT_HOST_PREFIX will be relative to the folder containing qt.conf. 2. Prefix is set a. If HostPrefix is not specified, then QT_HOST_PREFIX will have the Prefix value. b. If HostPrefix is specified and is relative, then QT_HOST_PREFIX will be relative to the folder containing the qt.conf. The logic might change in a future commit to use the current application directory instead of qt.conf path, since the use of qt.conf is dictated by the bootstrap library and this is no longer the case. Fixes: QTBUG-93707 Change-Id: I5460c97c45924bb8e0c95493afdb9585994c5f28 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Clear caches before exitingRobert Löhning2021-05-062-1/+5
| | | | | | | | To not scare sanitizers and their users. Change-Id: I51de5d6a5a358b3cf1355aeb6cc826a6ac021243 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* doc: Mention qmake6 as name of qmake executable on LinuxKai Köhne2021-05-051-0/+6
| | | | | | | Task-number: QTBUG-89170 Pick-to: 6.1 Change-Id: I16c86f04b4c34e7099c220cf028ba1cdb20550e9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix "qmake -spec foo" call for cross buildsJoerg Bornemann2021-04-262-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a cross built Qt, for example Qt for Android, calling "qmake -spec android-clang" led to an error message: "Could not find qmake spec '-qtconf'." This happened, because: - the qmake in Qt for Android is a wrapper script that calls "qmake -qtconf qt_target.conf -spec android-clang" - the first stage of command line argument handling in qmake garbled the call to "qmake -spec -qtconf qt_target.conf android-clang" We do not modify the order of arguments anymore. Instead, we skip the "-qtconf <file>" arguments in the first argument handling stage that is supposed to determine qmake's modus operandi (like -project or -query). In addition, we need to fix the assignment of QLibraryInfoPrivate::qtconfManualPath which was only done if QMakeGlobals::addCommandLineArguments returned ArgumentsOk. However, this function returns ArgumentUnknown, if it encounters an argument it cannot handle - like the project name. Now, we assign QLibraryInfoPrivate::qtconfManualPath if there was no error detected. Document the return values of addCommandLineArguments. This amends commit 661b586a69740bd9a1791622f8b238d290ebe00d. Pick-to: 6.1 6.0 Fixes: QTBUG-93079 Task-number: QTBUG-85136 Change-Id: I12ec25b17d64c00be2a3904b7c4a975b781500a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix infinite loop in qmake option parsingJonas Karlsson2021-04-221-3/+4
| | | | | | | | | | If calling 'qmake -qtconf file' an infinite loop occurs. Bug introduced in 661b586a69740bd9a1791622f8b238d290ebe00d Pick-to: 6.1 6.1.0 6.0 Change-Id: I3ccc067570308227b605d700b41b299800aa872a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qdoc: Name section 'Getting started with qmake'Kai Köhne2021-04-221-5/+5
| | | | | | | | | | Other manuals have a 'Getting started' section too. Better to qualify it further, so that searching in the Index of Qt Creator Help mode or Qt Assistant allows to differentiate between the different products. Pick-to: 6.1 Change-Id: I7cfdba3c3567bdf49d3fe34307576f88c9f20126 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Explicitly set input files for qtpreprocessChristoph Keller2021-04-121-0/+9
| | | | | | | | | | | | This fixes build errors with Xcode 10. Xcode 10 build system (a.k.a "New Build System") needs to know the input files in order to build a correct dependency graph. Especially when a build is not run for the first time and files changed in-between. Task-number: QTBUG-71035 Pick-to: 6.0 6.1 5.15 5.12 Change-Id: If8fbad3a1915add9b35c79131b03cdbe6b7ac06d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Explicitly set output files for qtpreprocessNikolay Avtomonov2021-04-071-1/+7
| | | | | | | | | | | | This fixes build error with XCode 10. XCode 10 build system (a.k.a "New Build System") requires all the files that are generated by scripts and used later on build to be explicitly defined as output files. Task-number: QTBUG-71035 Pick-to: 6.0 6.1 5.15 5.12 Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a way to install versioned hard-links for toolsJoerg Bornemann2021-03-251-0/+1
| | | | | | | | | | | | | | | | | Add the option argument INSTALL_VERSIONED_LINK to qt_internal_add_tool and qt_internal_add_app. For tools/apps with this argument we create an install rule that creates a versioned hard link. For example, for bin/qmake we create bin/qmake6. Note that this only applies to prefix builds. Apply this argument to qmake. The qt_internal_add_app change is necessary for qtdiag and in qttools. Task-number: QTBUG-89170 Change-Id: Id32d6055544c475166f4d854aaeb6292fbb5fbb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit c19d957f45fa27f61b5ecc566f8dbc19f12a44c3)
* Fix warning when building qmake with MSVCJoerg Bornemann2021-03-221-0/+1
| | | | | | | | Fix the C4715 warning for 'hostToTargetPathEnum' by marking the qFatal() branch as unreachable. Change-Id: Id065daaffd865e85985b1a8e0ac2eba4a2ff0b1c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Unify QLibraryInfo settingsAlexey Edelev2021-03-174-72/+34
| | | | | | | | | | | Exporting QLibraryInfo internals allows to reuse settings in qmake/qtpath without having to keep its own instance. Also there is no need to check setting groups in QLibraryInfo except the 'Paths' group, since this logic belongs to qmake/qtpaths only. Change-Id: If762defba025ad7f7489f8a86ef5768a8628bd2f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for various output formats for QMakePropertyAlexey Edelev2021-03-126-67/+213
| | | | | | | | | Add the ability to select a standard and json output formats of the Qt properties. This patch also improves the encapsulation of QMakeProperty. Change-Id: Ib1d232be1b430ed8456ce65cc98141282e4c3f7f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>