summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGen.h
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: fix `readability-redundant-access-specifiers` warningsBen Boeckel2021-01-271-1/+0
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-4/+4
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-2/+2
|
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+2
| | | | | 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.
* Autogen: Use JSON instead of CMake script for info filesSebastian Holtermann2019-09-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | 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-2/+3
|
* 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
* Autogen: Split JobProbeDepsT job into separate moc and uic jobsSebastian Holtermann2019-09-161-0/+3
| | | | | | | | | | | | | By splitting `JobProbeDepsT` into two independent `JobProbeDepsMocT`, `JobProbeDepsUicT`, the moc and uic job generation will happen concurrently. This should improve the execution speed, when both AUTOMOC and AUTOUIC are enabled. Parent directory names for moc and uic output files are are collected in a `std::unordered_set<std::string>` and get created in a batch. Beforehand we tried to create the parent directory for each output file. This led to duplications of `MakeDirectory` calls when there were multiple output files in the same directory (which is the case usually).
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* Autogen: Use cm::string_view for AUTO{MOC,UIC,RCC} generator namesSebastian Holtermann2019-08-271-2/+2
| | | | | - Store `AUTO{MOC,UIC,RCC}` generator name as `cm::string_view` - Use `std::initializer_list` instead of `std::array`
* Autogen: Modernize cmQtAutoGen methods using cm::string_viewSebastian Holtermann2019-08-271-4/+6
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Autogen: Evaluate compiler features for the same exectuable only onceSebastian Holtermann2019-05-221-0/+10
| | | | | | | To speed up the `AUTOGEN` configuration process, evaluate the compiler features only once. The feature evaluation result is stored in the new class `cmQtAutoGen::CompilerFeatures`, and the instance is shared by using `std::shared_ptr`.
* AutoRcc: Make rcc parsing function privateSebastian Holtermann2019-04-061-16/+0
| | | | | | The `.qrc` parsing functions in `cmQtAutoGen` are no longer needed outside the private implementation of `cmQtAutoGen::RccLister`. This makes them private, too.
* AutoRcc: Add cmQtAutoGen::RccLister classSebastian Holtermann2019-04-061-0/+39
| | | | | | The new `cmQtAutoGen::RccLister` class provides a simple interface to list files in a `.qrc` resources file by either calling `rcc` with list options or by parsing the resources file content.
* Autogen: Remove static const generator name strings from cmQtAutoGenSebastian Holtermann2019-04-021-9/+0
|
* Autogen: Use more readable variable names for static const AUTO* stringsSebastian Holtermann2019-02-261-8/+8
|
* Autogen: Rename cmQtAutoGen::GeneratorT enum to cmQtAutoGen::GenTSebastian Holtermann2019-02-211-14/+13
|
* Autogen: cmQtAutoGen: Store generator names in class static const stringsSebastian Holtermann2019-02-211-4/+14
|
* Autogen: Add and use QtAutoGen::Tools methodSebastian Holtermann2019-01-151-0/+3
|
* Autogen: Use integers to store the Qt versionSebastian Holtermann2018-08-131-0/+26
|
* Cleanup: Fix typos and grammar in docs and codeCraig Scott2018-04-221-1/+1
| | | No functional changes, just docs, comments and error messages.
* Autogen: Improved multi-config include schemeSebastian Holtermann2018-02-021-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | For multi configuration generators AUTOMOC generates the moc files that are included in `mocs_compilation.cpp` in `AUTOGEN_BUILD_DIR/include_$<CONFIG>/`. By doing so each configuration reads different moc files when compiling `mocs_compilation.cpp`. Since we do not (need to) rewrite `mocs_compilation.cpp` on a configuration change anymore, the files also does not need to be recompiled anymore. Not having to rewrite and recompile `mocs_compilation.cpp` on a configuration change anymore was the main objective of this patch. In a similar fashion AUTORCC generates a `qrc_BASE_CMAKE.cpp` file below `AUTOGEN_BUILD_DIR/include_$<CONFIG>/` and `qrc_BASE.cpp` becomes a mere wrapper that includes this actuall rcc output file (when using multi configuration generators). The template files `Modules/AutoRccInfo.cmake.in` and `Modules/AutogenInfo.cmake.in` were removed in favor of writing the info `.cmake` files manually. Closes #17230
* Autogen: Process files concurrently in AUTOMOC and AUTOUICSebastian Holtermann2018-01-171-19/+36
| | | | | | | | | | | | | | | | | | | | | | This introduces concurrent thread processing in the `_autogen` target wich processes AUTOMOC and AUTOUIC. Source file parsing is distributed among the threads by using a job queue from which the threads pull new parse jobs. Each thread might start an independent ``moc`` or ``uic`` process. Altogether this roughly speeds up the AUTOMOC and AUTOUIC build process by the number of physical CPUs on the host system. The exact number of threads to start in the `_autogen` target is controlled by the new AUTOGEN_PARALLEL target property which is initialized by the new CMAKE_AUTOGEN_PARALLEL variable. If AUTOGEN_PARALLEL is empty or unset (which is the default) the thread count is set to the number of physical CPUs on the host system. The AUTOMOC/AUTOUIC generator and the AUTORCC generator are refactored to use a libuv loop internally. Closes #17422.
* Autogen: Detect rcc feature once during configurationSebastian Holtermann2017-11-191-3/+3
| | | | | | | | We used to detect the `rcc` features before every `rcc` list invocation wich resulted in `rcc` be called twice for every listing operation. Now we detect the `rcc` list capabilities once during configuration and pass it to the cmake_autorcc target in the info file.
* Autogen: Reintroduce per-config sources supportSebastian Holtermann2017-09-251-9/+24
| | | | Reintroduce per-config sources support in AUTOGEN but disable it by default.
* Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::GeneratorSebastian Holtermann2017-09-251-3/+3
|
* Autogen: Use the same algorithm for RCC and UIC option mergingSebastian Holtermann2017-09-071-0/+10
|
* Autogen: Iterate source files only onceSebastian Holtermann2017-09-071-0/+47
This is a large commit that serves multiple purposes - Iterate source files only once and store all extracted information in a cmQtAutogenDigest class that can be reused. This is brings speed improvements because several properties are only evaluated once. More that that it helps to avoid duplication of code with non trivial files property checks. - Fix the Visual Studio generator to use PRE_BUILD when possible. - Convert `for( ... )` loops to C++11 range base loops where possible (cmQtAutogen*.cxx only). - String concatenation optimizations.