summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix AUTOMOC deps file to contain correct rule nameAlexandru Croitor2020-01-311-1/+8
| | | | | | | The rule name should include the current binary path relative to the top level binary path. Fixes: #20298
* Merge topic 'automoc-using-depfiles'Brad King2020-01-301-6/+49
|\ | | | | | | | | | | | | | | | | | | aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets f765fdea03 AutoGen: Use moc's feature to output dependencies f8c505d4b3 Add a parser for GCC-style depfiles Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Jan Niklas Hasse <jhasse@bixense.com> Merge-request: !4221
| * AutoGen: Use depfiles for the XXX_autogen ninja targetsJoerg Bornemann2020-01-281-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XXX_autogen targets are implemented as utility commands, which means they always run, even if there weren't any changes. For the Ninja generator and Qt >= 5.15 we're taking a different approach: This commit adds custom commands that create XXX_autogen/timestamp files. Those custom commands have a depfile assigned that is generated from the depfiles that were created by moc. The XXX_autogen targets merely wrap the XXX_autogen/timestamp custom commands. Fixes: #18749
| * AutoGen: Use moc's feature to output dependenciesJoerg Bornemann2020-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt version 5.15.0 moc learned to output the dependencies of the generated file. This commit enhances JobCompileMocT to read the dependency file written by moc. The dependencies are stored in the same cache that's used for the dependencies determined by dependency filters. The dependency filter functionality is turned off if moc's dependency output feature is used. Fixes: #17750 Fixes: #19058
* | cm::String: enhance compatibility with STLMarc Chevrier2020-01-251-1/+0
|/
* Merge topic 'autogen_rcc_skip_unity'Brad King2020-01-201-10/+14
|\ | | | | | | | | | | | | | | 086d9b2bab Autogen: Enable SKIP_UNITY_BUILD_INCLUSION on AUTORCC generated files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Cristian Adam <cristian.adam@gmail.com> Merge-request: !4237
| * Autogen: Enable SKIP_UNITY_BUILD_INCLUSION on AUTORCC generated filesSebastian Holtermann2020-01-171-10/+14
| | | | | | | | | | | | | | | | | | | | `rcc` generated files are not compatible with unity builds, because they contain classes in anonymous namespaces and static data with identical names. This patch sets the source file property `SKIP_UNITY_BUILD_INCLUSION` to `On` on all `AUTORCC` generated files to exclude them from unity build files. Fixes: #20191 "QT5: Exclude resource files from unity build"
* | cmMakefile: modernize memory managementMarc Chevrier2020-01-141-5/+5
| |
* | Autogen: Process .hh headers based on new policy CMP0100 settingsSebastian Holtermann2020-01-041-40/+87
| | | | | | | | | | | | | | Reintroduces .hh header processing in AUTOMOC and AUTOUIC based on the new policy CMP0100 setting. Fixes: #13904 CMAKE_AUTOMOC misses headers with ".hh" extension
* | Autogen: Try adding header suffix to moc output file name on name conflictsSebastian Holtermann2020-01-041-13/+31
| | | | | | | | | | | | | | In AUTOGEN, this changes the moc output file name computation on output name conflicts to first try to add the header suffix to the moc output base name. When that still conflicts, we try adding a range of sequential numbers. If we still can't find an unique output name, we raise an error.
* | Merge topic 'autogen-no-hh'Brad King2019-12-191-2/+4
|\ \ | |/ | | | | | | | | | | 7fa7f55230 Autogen: Revert processing of .hh files for compatibility Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4146
| * Autogen: Revert processing of .hh files for compatibilityBrad King2019-12-181-2/+4
| | | | | | | | | | | | | | | | | | | | Since commit 4a9154537c (Autogen: Use cmake::IsHeader/SourceExtension for file type detection, 2019-07-02, v3.16.0-rc1~470^2~4) we process `.hh` files with `AUTOMOC`. However, this change can break existing projects that do not expect the behavior. Revert it for now. It can be restored later via a policy. Fixes: #20101
* | Merge topic 'stdstring-target'Brad King2019-12-171-4/+4
|\ \ | | | | | | | | | | | | | | | | | | c34b4497f8 cmTarget: add std::string overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4137
| * | cmTarget: add std::string overloadsVitaly Stakhovsky2019-12-141-4/+4
| | |
* | | Ninja: Add multi-config variantKyle Edwards2019-12-131-3/+10
|/ / | | | | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* | cmMakefile: Delay custom command creationDaniel Eiband2019-11-241-8/+7
| | | | | | | | | | | | | | | | Move custom command creation to cmLocalGenerator and dispatch custom commands in cmMakefile to generate time. Generators add custom commands using the new methods provided by cmLocalGenerator. Issue: #12877
* | cmCustomCommand: Explicitly pass backtrace on constructionDaniel Eiband2019-11-241-2/+2
| |
* | cmLocalGenerator: modernize memory managementMarc Chevrier2019-11-111-2/+2
|/
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-20/+21
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmCustomCommand: Move custom commandsDaniel Eiband2019-09-261-1/+1
|
* cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-4/+4
| | | | The enumerations will also be used in cmLocalGenerator.
* Autogen: Use JSON instead of CMake script for info filesSebastian Holtermann2019-09-251-365/+427
| | | | | | | | | | | | | | | | | | | | | | | We used to store information for the _autogen target in a CMake script file AutogenInfo.cmake, which was imported by a temporary cmake instance in the _autogen target. This introduced the overhead of creating a temporary cmake instance and inherited the limitations of the CMake language which only supports lists. This patch introduces JSON files to pass information to AUTORCC and autogen_ targets. JSON files are more flexible for passing data, e.g. they support nested lists. The patch has the side effects that - AutogenInfo.cmake is renamed to AutogenInfo.json - AutogenOldSettings.txt is renamed to AutogenUsed.txt - RCC<qrcBaseName><checksum>Info.cmake is renamed to AutoRcc_<qrcBaseName>_<checksum>_Info.json - RCC<qrcBaseName><checksum>.lock is renamed to AutoRcc_<qrcBaseName>_<checksum>_Lock.lock - RCC<qrcBaseName><checksum>Settings.txt is renamed to AutoRcc_<qrcBaseName>_<checksum>_Used.txt
* Autogen: Variable renames and cleanupsSebastian Holtermann2019-09-251-19/+22
|
* Autogen: Inline GetKnownQtVersions functionSebastian Holtermann2019-09-251-49/+45
|
* Autogen: Return unsigned int from GetParallelCPUCount()Sebastian Holtermann2019-09-251-6/+5
|
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* Merge topic 'autogen_path_prefix'Brad King2019-09-191-170/+196
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc0900d9cd Help: Add release notes for AUTOMOC_PATH_PREFIX 692d8e3492 Help: Add documentation for AUTOMOC_PATH_PREFIX 1933ade9f1 Tests: At QtAutogen.MocIncludeSymlink test 706d9738a6 Tests: Merge QtAutogen.MocIncludeStrict and MocIncludeRelaxed d018d27c10 Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX) 77983c8147 Autogen: Add IsHeader flag to SourceFileT class f9e5441eb4 Autogen: Abbreviate file paths in messages 51676cf655 Autogen: Split JobEvalCacheT job into separate moc and uic jobs ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3818
| * Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX)Sebastian Holtermann2019-09-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new `AUTOMOC_PATH_PREFIX` boolean target property enables automatic generation of the path prefix `-p` option for `moc`. `AUTOMOC_PATH_PREFIX` is initialized from the variable `CMAKE_AUTOMOC_PATH_PREFIX`, which is ON by default. When `AUTOMOC_PATH_PREFIX` is enabled, CMake tests if a `moc`ed header file is in one of the include directories. If so, then the `-p` option, with the relative path of the header parent directory to the respective include directory, is added to the `moc` command. If the header file is not in an include directory, the `-p` option is omitted. Closes: #18815 "AUTOMOC: generated files include full relative path, breaking certain reproducible builds"
| * Autogen: Abbreviate file paths in messagesSebastian Holtermann2019-09-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | This introduces the `cmQtAutoGenerator::MessagePath` method, that abbreviates paths by placing a - "SRC:" prefix in place of the project source directory - "BIN:" prefix in place of the project binary directory The method is used in `AUTO{MOC,UIC,RCC}` when paths are displayed in messages. This makes the messages generated by `AUTO{MOC,UIC,RCC}` shorter and improves their readability.
| * Autogen: Remove CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE sort duplicationSebastian Holtermann2019-09-161-2/+0
| | | | | | | | | | | | | | This removes code that sorts include directories for `AUTOMOC` according to `CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE`. This is possible because the included directories passed to `AUTOMOC` are already sorted, also with respect to `CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE`.
| * Autogen: Use CollapseFullPath instead of RealPath to support symbolic linksSebastian Holtermann2019-09-161-31/+26
| |
| * Autogen: Sanitize include and search directoriesSebastian Holtermann2019-09-161-9/+41
| |
| * Autogen: Modernize by using an unnamed namespace instead of static functionsSebastian Holtermann2019-09-161-6/+9
| |
| * Autogen: Compute and store generator pointers once in initializer constructorSebastian Holtermann2019-09-161-124/+113
| |
* | cmCustomCommandLine: Provide command line make functionsDaniel Eiband2019-09-161-24/+9
|/ | | | | Reduce boilerplate necessary to create custom command lines by introducing and applying cmMakeCommandLine and cmMakeSingleCommandLine functions.
* add_custom_command: Refactor setting implicit dependsDaniel Eiband2019-09-121-4/+6
| | | | | Implicit dependencies are now passed as argument to AddCustomCommandToOutput. This is necessary to be able to delay custom command creation.
* IWYU: Add missing cstddef includes for size_t and nullptr_tBrad King2019-09-031-0/+1
| | | | The IWYU tool we use for CI now diagnoses these.
* cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-3/+3
| | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* Autogen: cmQtAutoGenInitializer string concatenation cleanupsSebastian Holtermann2019-08-271-52/+43
|
* Autogen: Use cm::string_view for AUTO{MOC,UIC,RCC} generator namesSebastian Holtermann2019-08-271-18/+25
| | | | | - Store `AUTO{MOC,UIC,RCC}` generator name as `cm::string_view` - Use `std::initializer_list` instead of `std::array`
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-7/+4
| | | | | | | | | | | | 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-41/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Merge topic 'string-literal-append'Brad King2019-08-191-4/+2
|\ | | | | | | | | | | | | da26b3be89 avoid adding multiple consecutive string literals to std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3698
| * avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-4/+2
| | | | | | | | While at it change some single character additions to be of type char.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-3/+2
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Merge topic 'cmExpandList'Kyle Edwards2019-08-161-6/+6
|\ | | | | | | | | | | | | | | | | 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-6/+6
| |
* | cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-2/+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-64/+35
|
* Autogen: Modernize code to use cm::string_view for the info writerSebastian Holtermann2019-08-071-19/+14
|