aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/generators
Commit message (Collapse)AuthorAgeFilesLines
* baremetal: Long live the IAR EW project generator for MSP430Denis Shienkov2019-08-282-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew7 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew7' generator which allow to generate a projects for the IAR EW for MSP430 for all versions of 7 series. Tested with the IAR EW for MSP430 v7.12.4, using as the QBS bare-metal examples, and as other projects. Change-Id: Ic0bbc82e6ebb3b04bced639797976e432809171f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the KEIL UV project generator for ARMDenis Shienkov2019-08-202-0/+51
| | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the KEIL UVision IDE, e.g. using the following command: qbs generate -g keiluv5 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid KEIL QBS profile, from which the generator take a desired target architecture and other stuff. The KEIL UV generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native KEIL UVsion project. Currently it is supported only one 'keiluv5' generator which allow to generate a projects for the KEIL UVision v5 for ARM architecture. Tested with the KEIL UVision v5.23 for ARM, using as the QBS bare-metal examples, and as other projects. Change-Id: I3af9d01f25a9570a99a62d4ce2c30fec3566b9a1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use different names for virtual functions in INodeVisitorIvan Komissarov2019-08-169-32/+32
| | | | | | | | This fixes compiler warnings about hidden virtual functions in derived classes Change-Id: I3b53d07263f66133a41353eb6cfe05e1f3b20cc3 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.14 into masterChristian Kandeler2019-08-021-16/+4
|\ | | | | | | Change-Id: Ib40a6fb77dfb1653910e802276571fc5dcea4d64
| * Avoid uses of Java-style iteratorshjk2019-07-301-16/+4
| | | | | | | | | | Change-Id: I90cece156033b5d223a86016401a2199f5b6c11e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for STM8Denis Shienkov2019-08-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew3 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew3' generator which allow to generate a projects for the IAR EW for STM8 for all versions of 3 series. Tested with the IAR EW for STM8 v3.11.1, using as the QBS bare-metal examples, and as other projects. Change-Id: I47880d62cd1e81ed7bbfba840a5af0c558065013 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Share common generators codeDenis Shienkov2019-07-3118-2/+1403
|/ | | | | | | | | | | Common code which are used for the 'iarew' and 'keiluv' generators was moved to the corelib/generators library. Besides, this code also can be used in future for the XML-based generators. Change-Id: I79a21e3e078d563600d7f365785731fe9e847045 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply fix-its for the missing override keywordIvan Komissarov2019-05-031-1/+1
| | | | | | | | Missing override is a warning in clang Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use pass-by-value and moveIvan Komissarov2019-03-072-3/+3
| | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-061-1/+1
| | | | | | | | This fixes -Wclazy-range-loop Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Return initializer list where it is possibleDenis Shienkov2019-02-261-2/+2
| | | | | | | | | This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use QStringLiteral more where it is possibleDenis Shienkov2019-02-251-7/+7
| | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace 'typedef' with 'using' where it is possibleDenis Shienkov2019-02-231-1/+1
| | | | | | | | One exception is that the 'typedef' for function pointers were skipped due to an additional work is required. Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* corelib: Apply modernize-use-overrideAlessandro Portale2018-08-201-1/+1
| | | | | | | Add overrides to function, except for destructors. Change-Id: I1a1337b01dfef81b74ba56c5f00bf4d4cfc10935 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectGenerator: Return an error statusChristian Kandeler2018-04-232-7/+12
| | | | | | | As per our policy not to let exceptions cross the API boundary. Change-Id: I52e1fb9448466181b73fcd0e4c74ef33f71de98e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.11 into masterChristian Kandeler2018-04-201-1/+1
|\ | | | | | | Change-Id: Iebe7584bd2978a8f8be093c6b366033076f83e74
| * Fix QbsGenerateCommandLine in VS project generatorJoerg Bornemann2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | Configuration names must be prefixed by "config:". This amends commit caa7d868. Task-number: QBS-1303 Change-Id: Iac72218990f94a27f74bb7f9dd5ea57b92fbb0aa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Clean up the ProjectGenerator interfaceChristian Kandeler2018-04-201-9/+7
| | | | | | | | | | | | | | | | | | Make the virtual generate() function private; it is only supposed to be called from within this class. Merge the two "private:" sections while we're at it. Change-Id: I43dbd5d45e8c5d803f1bfbf088dbe1944a59c05b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Generators API: add missing constJake Petroules2018-02-191-2/+2
|/ | | | | Change-Id: Idb590beabb1b31f88ebb47705947a31dd3da545a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Install missing header filesChristian Kandeler2018-01-111-0/+10
| | | | | Change-Id: I2fb8540ceba602f88d7bae16b09b1d95e5047abf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.10 into masterChristian Kandeler2018-01-051-0/+2
|\ | | | | | | Change-Id: I29a74f96381a1b77c6cb1959547314786690baa4
| * Don't crash when calling methods on empty IMultiplexableContainersJake Petroules2018-01-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | Default-constructed GeneratableProjectData objects may be passed to generator methods as placeholders (in the case of the Visual Studio generator) and calling methods on such objects must not dereference invalid iterators. Task-number: QBS-1257 Change-Id: I1c2bfff015efc98cbfb66d02b497320429b6c6da Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not use the set class outside corelibChristian Kandeler2017-12-071-1/+0
| | | | | | | | | | | | | | It was and is meant for internal use only. Change-Id: Ibe15f5838f9b728ec397a668a94128abe4ef5efa Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | corelib: Gather string constants in central placeChristian Kandeler2017-11-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same string literals appeared over and over again in the code base, causing redundancy in the sources as well as at run-time. We now give them a name and make sure they get instantiated at most once. String literals that occur only once are converted from QLatin1String to QStringLiteral unless they appear only in contexts that make use of QLatin1String overloads or they are clearly outside of any hot code paths. This seems to result in small, but measurable performance improvements, even if we assume the 1% changes to be noise: ========== Performance data for Resolving ========== Old instruction count: 3266514138 New instruction count: 3209355927 Relative change: -2 % Old peak memory usage: 29649896 Bytes New peak memory usage: 29436264 Bytes Relative change: -1 % ========== Performance data for Rule Execution ========== Old instruction count: 3367804753 New instruction count: 3319029596 Relative change: -2 % Old peak memory usage: 19577760 Bytes New peak memory usage: 19091328 Bytes Relative change: -3 % ========== Performance data for Null Build ========== Old instruction count: 608946535 New instruction count: 604566001 Relative change: -1 % Old peak memory usage: 14606384 Bytes New peak memory usage: 14579936 Bytes Relative change: -1 % Change-Id: Ia055a52e0a4b6fe6fd0f1e7ba4bfa583cba1b0ef Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | STL compatibility: use push_back() instead of append()Jake Petroules2017-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | ...or operator<< if the argument was itself a list, or brace init where appropriate. This is a simple find and replace with manual sanity check. Change-Id: I94b79cbf3752192dd258001bf1dfcd46f58ca352 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | STL compatibility: use empty() instead of isEmpty()Jake Petroules2017-11-161-2/+2
|/ | | | | | | This is a simple find and replace with manual sanity check. Change-Id: Iab6d46dcc3be246d1650aae2b1730f933b717be8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Generator data: add some utility methods for iterating configurationsJake Petroules2017-09-011-0/+80
| | | | | | | These will be used in a subsequent commit. Change-Id: I004da66d0cb334d6de3083d63c85d153403fd56b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Generator data: add type and build directory methodsJake Petroules2017-09-012-1/+17
| | | | | | | These will be used in a subsequent commit. Change-Id: I768a3b4fa01329b43e4c993b9b4bee7d3dfb3a34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Generator data: use a template method to reduce pattern duplicationJake Petroules2017-09-012-53/+36
| | | | | Change-Id: I7613d221fba6d343726418837ce5f3013b9a8d96 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Provide a logger instance to the generatorsJake Petroules2017-06-222-2/+14
| | | | | | | Replace a qDebug usage with it. Change-Id: I4fa34c2e48100a6ec7c10bae8d2ca186dbab9d29 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Transform the scanner plugin manager into a true generic plugin managerJake Petroules2017-06-1379-6206/+4
| | | | | | | | | | | | ...and fit the generator plugins into this new plugin structure. Plugins are now handled entirely by the build system in a generic manner and no part of qbscore (code or build files) has a direct reference to any plugin regardless of whether qbs is being built as shared or static libraries. Change-Id: I4a20546ce275df71083ee22c2cb67f781c4de764 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.8 into masterChristian Kandeler2017-06-095-5/+78
|\ | | | | | | Change-Id: I2fcb2113a24c8807467aa03aa3e7590d53761706
| * Fix mismatched class/struct warningJake Petroules2017-06-081-1/+1
| | | | | | | | | | | | | | This fixes a regression introduced in e68a7a5. Change-Id: Ic1df82c636b8505e83fdca58c28062bd54bbea17 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Add an entry for the qbs file itself in the generated vcxprojJake Petroules2017-06-064-0/+36
| | | | | | | | | | | | | | Task-number: QBS-1128 Change-Id: I632096fd350472c7274a6cb38b4ddbdf8ec04515 Reviewed-by: Thomas Epting <thomas.epting@stryker.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix handling of same subproject names in generated VS solutionsJake Petroules2017-06-063-5/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Qbs product names must be unambiguous, using the same project name several times is perfectly valid, as long as all projects with the same name belong to a different root project. Utilize the project's source file location to distinguish projects that have the same name. Use this in conjunction with the name to create an ID that is used as the key for the solutionFolders map. Change-Id: I47079cd4207d505892e79755a3986614025d2749 Task-number: QBS-1082 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thomas Epting <thomas.epting@stryker.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace QSharedPointer/QWeakPointer with std::shared_ptr/std::weak_ptrJake Petroules2017-05-232-27/+27
|/ | | | | Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace all uses of QVector with std::vectorJake Petroules2017-03-296-26/+20
| | | | | Change-Id: Idd41fc4d9819649a85739f984862bed6480fddd5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QSet with Internal::SetJake Petroules2017-03-223-16/+14
| | | | | Change-Id: I0ba0a39b4f7d8c7c76b869584317b53b85cffc81 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QPair/qMakePair with std::pair/std::make_pairJake Petroules2017-03-223-5/+6
| | | | | Change-Id: I1cde37fcf30b066130b9f5ff13743af009a6cb4f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.7 into masterChristian Kandeler2017-02-109-21/+110
|\ | | | | | | Change-Id: I4ca26628cb30ca75ceab0ca38d8bb253193b6166
| * Set product run environment in generated Visual Studio projectsJake Petroules2017-02-081-0/+53
| | | | | | | | | | | | | | Task-number: QBS-1100 Change-Id: Ic2edf882dacd17e4833074e52715dc42bb74cdac Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Replicate '--settings-dir' option to Visual Studio generatorDenis Shienkov2017-02-087-16/+50
| | | | | | | | | | | | | | Task-number: QBS-1077 Change-Id: Ib20d8d8242f8b51ba353968e39cedb8945a86331 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Generators: pass down full InstallOptions instead of just install rootJake Petroules2017-02-073-5/+7
| | | | | | | | | | | | | | This is needed for a followup patch to add environment handling. Change-Id: Id492226c4b51646a97f7c2de1bb7e91dab512d32 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use a sorted vector rather than QSet or std::setChristian Kandeler2017-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========== Performance data for Resolving ========== Old instruction count: 2324724447 New instruction count: 2317712921 Relative change: -1 % Old peak memory usage: 21411584 Bytes New peak memory usage: 21070552 Bytes Relative change: -2 % ========== Performance data for Rule Execution ========== Old instruction count: 4231322611 New instruction count: 4246208129 Relative change: +0 % Old peak memory usage: 19239000 Bytes New peak memory usage: 18181072 Bytes Relative change: -6 % ========== Performance data for Null Build ========== Old instruction count: 542161499 New instruction count: 505511534 Relative change: -7 % Old peak memory usage: 13599040 Bytes New peak memory usage: 11892952 Bytes Relative change: -13 % Change-Id: I36b3dbd3fd2a4bc7503ee7779d31bd0217000785 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Change style of #includes of Qt headersJake Petroules2017-01-0434-68/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.7 into masterChristian Kandeler2017-01-021-3/+9
|\| | | | | | | Change-Id: I3ca5362d88742fa1a0e839ac4dc1f072e87c06cd
| * VS generator: Don't prepend $(ProjectDir) to absolute pathsThomas Epting2016-12-181-2/+6
| | | | | | | | | | | | Task-number: QBS-1081 Change-Id: I62f2016f87d0186eea6f8c7e3e784ab28f72f981 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * VS generator: Add missing trailing backslash to OutDir variableThomas Epting2016-12-181-1/+3
| | | | | | | | | | | | Task-number: QBS-1080 Change-Id: I1b390dd31d10675f0e1f4fe3abdee2980909724d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Fix "multiple default constructors" warningJoerg Bornemann2017-01-021-2/+2
|/ | | | | Change-Id: Ifb0f1e0be7117cfb2a0709409df10f419b14f176 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Don't install static library productsJake Petroules2016-09-082-0/+2
| | | | | Change-Id: I09e87843b5df2d7f1f1a7f8fc0558f40ec97fe9a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>