aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/generators
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Make the project structure of generators consistentJake Petroules2016-09-0874-3/+5863
| | | | | Change-Id: I4cd8ffc3e0aded0b962b9f12682ec8db08902ced Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Update license headersIikka Eklund2016-08-294-53/+89
| | | | | | | | | | Patch-set 2 includes *.cpp *.c Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Update license headersIikka Eklund2016-08-295-67/+112
| | | | | | | | | | Patch-set 1 includes *.h Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Clean up generator codeChristian Kandeler2016-08-234-33/+34
| | | | | | | | - Remove unnecessary namespace qualifications. - Add virtual destructor to base class. Change-Id: Ie6ae45c1fb8ef8756b1ddffb58de452e38de1e15 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix buildChristian Kandeler2016-08-231-3/+3
| | | | | | | | The construct might actually be legal, but older GCC versions do not accept it. Change-Id: Ifaf68f8f550fb0bcc2da8ac420c0858198c5cbbc Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix build with MSVCChristian Kandeler2016-08-231-8/+8
| | | | | Change-Id: Ice4e529cd79bdd21c91179e7ad0e2036a1a40974 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Flesh out generators APIJake Petroules2016-08-2210-68/+684
| | | | | | | | This puts in place some of the infrastructure needed by subsequent commits that will introduce the Visual Studio and Xcode generators. Change-Id: Ic8f127acef5c26e26edb7083ebd423848d81a6ff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix qmake buildChristian Kandeler2016-08-191-0/+5
| | | | | | | Forgot to add .pri file. Change-Id: I2fc5af3e88a3e380e3fb359a4daf42c3d0ab7353 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add generator for Clang compilation databaseChristian Gagneraud2016-08-193-0/+211
| | | | | Change-Id: Ia82e2f7bcd93afbca88e7034aeadb0ba8c336458 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Forward parsed properties from the qbs CLI frontend to generatorsJake Petroules2016-07-261-0/+26
| | | | | | | | | This allows generated IDE project files to call back to qbs using the same set of property bindings as the build was originally invoked with. Change-Id: I682e015f3e46e6e654cf082c8c3515c2b1c78424 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* update license headersJoerg Bornemann2015-03-021-11/+12
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add an API to support build system generators.Jake Petroules2015-02-122-0/+108
More generally, a plugin-based API to support performing arbitrary operations producing some output given a resolved qbs project. Task-number: QBS-658 Change-Id: I5c0c3652520ec17e751ad9980bc186dde58e48d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>