summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoMocUic.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'autogen_strcat'Brad King2019-08-291-273/+226
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 32b15d320f Autogen: cmQtAutoMocUic settings hash computation optimizations b66cd3fe63 Autogen: cmQtAutoMocUic string concatenation cleanups 619a92eacd Autogen: cmQtAutoRcc settings hash computation optimizations 10dc684508 Autogen: cmQtAutoRcc string concatenation cleanups da6c4b1273 Autogen: cmQtAutoGenInitializer string concatenation cleanups 7a78d15415 Autogen: Let cmQtAutoGenerator::Logger methods accept cm::string_view c797148e85 Autogen: Use cm::string_view for AUTO{MOC,UIC,RCC} generator names 8586077baa Autogen: Modernize cmQtAutoGen methods using cm::string_view Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3742
| * Autogen: cmQtAutoMocUic settings hash computation optimizationsSebastian Holtermann2019-08-271-15/+9
| |
| * Autogen: cmQtAutoMocUic string concatenation cleanupsSebastian Holtermann2019-08-271-258/+217
| |
* | Merge topic 'autogen_fix_use_after_move'Brad King2019-08-281-2/+2
|\ \ | |/ |/| | | | | | | | | e32f70036c Autogen: Fix AUTOUIC segfault, when file includes colliding ui_*.h file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3745
| * Autogen: Fix AUTOUIC segfault, when file includes colliding ui_*.h fileSebastian Holtermann2019-08-271-2/+2
| | | | | | | | | | | | | | This fixes a case of use after move of a `std::shared_ptr` in `AUTOUIC`. It triggered a segfault, when the error message for colliding `ui_*.h` includes in different files was computed.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-72/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* | clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-2/+4
| |
* | Merge topic 'cmExpandList'Kyle Edwards2019-08-161-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 2f6495e24e cmSystemTools: Remove ExpandListArgument methods f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument ff42dec891 cmStringAlgorithms: Add cmExpandList functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3682
| * | Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-4/+3
| | |
* | | cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-3/+2
|/ / | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | Autogen: Modernize to use cmStrCat for string concatenationSebastian Holtermann2019-08-071-114/+72
| |
* | Cleanups: Use cmHas{Prefix,Suffix} instead of String{Starts,Ends}WithSebastian Holtermann2019-08-011-1/+1
| |
* | cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | | | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* | Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|/
* Autogen: Deprecation message for CMAKE_AUTOMOC_RELAXED_MODESebastian Holtermann2019-05-271-4/+4
| | | | | | | | | | | | | | | | `CMAKE_AUTOMOC_RELAXED_MODE` was added for backwards compatibility with KDE 4, which had its last release in 2014. It does not offer additional features but complicates the `AUTOMOC` code and dependency computation considerably. Projects that use `CMAKE_AUTOMOC_RELAXED_MODE` functionality always got extensive warnings during builds and tips on how to convert to regular mode, which is trivial (see commit e474dcb231, CMake 2.8.7). It's time to consider this feature deprecated and issue a warning at configuration time as well. This adds a configuration time deprecation `AUTHOR_WARNING` for `CMAKE_AUTOMOC_RELAXED_MODE`.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-9/+6
|
* Autogen: Refactor AUTOMOC and AUTOUIC and add source file parse data cachingSebastian Holtermann2019-05-071-1137/+1588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New features ------------ CMake's `AUTOMOC` and `AUTOUIC` now cache information extracted when parsing source files in `CMakeFiles/<ORIGIN>_autogen.dir/ParseCache.txt`. This leads to faster `<ORIGIN>_autogen` target rebuilds, because source files will be parsed again only if they're newer than the `ParseCache.txt` file. The parse cache will be recomputed if it is older than the CMake executable. `AUTOMOC` and `AUTOUIC` now check if `moc` or `uic` output files are older than the `moc` or `uic` executable. If an output file is older than the compiler, it will be regenerated. Therefore if a new `moc` or `uic` version is installed, all output files will be regenerated. `AUTOMOC` and `AUTOUIC` error and warning messages are more detailed. Internal changes ---------------- `moc` and `uic` output file names are not computed in the `_autogen` target anymore but in `cmQtAutoGenInitializer`. This makes the available at the configuration stage for improved dependency computations (to be done). In `AutogenInfo.cmake`, equally sized lists for "source file names", "source file flags" and "compiler output file names" are passed to the `_autogen` target. This replaces the separate file lists for `AUTOMOC` and `AUTOUIC`. Files times are read from the file system only once by using `cmFileTime` instances instead of `cmQtAutoGenerator::FileSystem::FileIsOlderThan` calls. All calls to not thread safe file system functions are moved to non concurrent fence jobs (see `cmWorkerPool::JobT::IsFence()`). This renders the `cmQtAutoGenerator::FileSystem` wrapper class obsolete and it is removed. Instead of composing a single large settings string that is fed to the `cmCryptoHash`, now all setting sub strings are fed one by one to the `cmCryptoHash` and the finalized result is stored. The `std::mutex` in `cmQtAutoGenerator::Logger` is tagged `mutable` and most `cmQtAutoGenerator::Logger` methods become `const`. Outlook ------- This patch provides the framework required to - extract dependencies from `.ui` files in `AUTOUIC`. These will help to address issue #15420 "AUTOUIC: Track uic external inputs". - generate adaptive `make` and `ninja` files in the `_autogen` target. These will help to address issue #16776 "AUTOUIC: Ninja needs two passes to correctly build Qt project". - generate (possibly empty) `moc` and `uic` files for all headers instead of a `mocs_compilation.cpp` file. This will help to address issue #17277 "AUTOMOC: Provide a option to allow AUTOMOC to compile individual " "moc_x.cxx instead of including all in mocs_compilation.cxx"
* cmWorkerPool: Set worker thread count separately to Process()Sebastian Holtermann2019-04-241-4/+2
| | | | | | | Don't pass the desired worker thread count to the `cmWorkerPool::Process()` method but set it separately with the new `cmWorkerPool::SetThreadCount` method. This allows calling `cmWorkerPool::Process()` repeatedly without having to pass the thread count every time.
* Autogen: Rename `cmQtAutoGeneratorMocUic` class to `cmQtAutoMocUic`Sebastian Holtermann2019-04-151-0/+1747
The class name `cmQtAutoGeneratorMocUic` is long and cumbersome. This renames it to `cmQtAutoMocUic`.