| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until CMake 3.10 a list of source files that had the AUTOUIC_OPTIONS property
populated was kept in `cmMakefile::QtUiFilesWithOptions`. In the process to
remove all AUTOUIC related code from `cmMakefile` for CMake 3.10, the pre
filtered list was replaced by a loop in `cmQtAutoGeneratorInitializer` over
all source files in the `cmMakefile`. This loop introduced the problem that
file paths were computed for source files that weren't in the target's sources
and that might not even have existed. If the path for an unused and not
existing file was computed a `cmake::FATAL_ERROR` with the error message
"Cannot find source file:" was thrown nevertheless.
This caused some projects to fail in CMake 3.10.
This patch adds a test for path errors in the loops in
`cmQtAutoGeneratorInitializer` that iterate over all source files in a
`cmMakefile`. If a path error appears, the file is silently ignored.
If the file is part of the target's sources, the path error will still be
caught in the loop over all the target's sources.
Closes #17573
Closes #17589
|
|
|
|
|
|
|
|
| |
Library dependencies of the origin target were forwarded to the
_autogen target as source file dependencies. This is fixed by
forwarding the dependencies as target dependencies instead.
Issue: #17278
|
|
|
|
|
|
| |
Some generators auto-generate targets. For example VS generators create
the ALL_BUILD target. Add the ability to mark targets as generator
provided and return that info through cmake-server codemodel.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Remove the cmQtAutoGenDigest classes and make
cmQtAutoGeneratorInitializer instantiable instead.
|
|
|
|
|
|
| |
Adds the new base class `cmQtAutoGenerator` which contains common
variables and methods used by `cmQtAutoGeneratorMocUic` and
`cmQtAutoGeneratorRcc`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of processing all `rcc` invocation requests in the
_autogen target that calls `cmake -E cmake_autogen ...` once,
use a dedicated custom command that calls
`cmake -E cmake_autorcc ...` for each `.qrc` file.
This allows parallel `.qrc` file processing and reduces the
workload (and complexity) in the _autogen target.
If only `AUTORCC` is enabled, the _autogen target won't be created
at all since it is now used for `AUTOMOC` and `AUTOUIC` only.
For `.qrc` files that are GENERATED a custom target is used
instead of a custom command.
Closes #17161
|
|
|
|
|
|
|
| |
When a STATIC_LIBRARY cycle is detected we don't add any STATIC_LIBRARY target
from the cycle to the `_autogen` target dependencies.
Closes #17389
|
|
|
|
|
| |
SKIP_AUTOUIC and SKIP_AUTOGEN were ignored when set on a `.ui` file that
was not in the sources of the target.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
93c8d55d Autogen: Update (CMAKE_)AUTOMOC_MACRO_NAMES release notes
084ace47 Autogen: Tests: Update AUTOMOC_MACRO_NAMES test
08041dd1 Autogen: Doc: Update documentation for (CMAKE_)AUTOMOC_MACRO_NAMES
7b33d67b Autogen: Create info file directory before writing
786b5be0 Autogen: Define all macro names in CMAKE_AUTOMOC_MACRO_NAMES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1321
|
| | |
|
|/ |
|
|
|
|
| |
Reintroduce per-config sources support in AUTOGEN but disable it by default.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
7d509579 Meta: modernize old-fashioned loops to range-based `for`.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1249
|
| |
| |
| |
| |
| |
| | |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- The output file name of the `rcc` command get computed once
in the AUTOGEN initializer and is passed in the info file.
- The function name for the `-name` option of `rcc` gets computed
once in the AUTOGEN initializer and is passed along with the
other `rcc` options in the info file.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
|
|
|
|
| |
The purpose of this patch is to allow later removal of
AUTOGEN specific variables in cmMakefile and cmSourceFile.
|
|
|
|
|
|
|
|
|
| |
This allows to pass SKIP_AUTOMOC hints to the
FOO_autogen target from files that are not listed
in the target sources.
The problem was that if main.cpp was listed in the source
but not main.h, then SKIP_AUTOMOC for main.h was ignored.
|
|
|
|
|
|
| |
The amount of disabled code was small.
Also the #ifdef tests were confusing and made
testing on non Windows machines more difficult.
|
| |
|
| |
|
|
|
|
| |
Closes #17176
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds cmGeneratorTarget::clearSourcesCache() which clears the cache
of precomputed sources lists and object names. The cache gets
recomputed on demand.
Clearing the cache is necessary in case an OBJECT library
gets a source added after a target (ORIGIN) that includes it
computed it's external sources cache.
This may happen in AUTOMOC when ORIGIN is processed before the
OBJECT library which gets a mocs_compilation.cpp file added.
Closes #17152
Closes #17139
Closes #17085
Closes #15967
|
|
|
|
|
|
|
| |
Enables the AUTOGEN per-config include directories and wrapper sources
for multi configuration generators.
Closes #16460
|
|
|
|
|
|
|
|
|
|
|
| |
For multi configuration generators remove per-config
qrc_FOO_$<CONFIG>.cpp source file support.
Instead use a single source file qrc_FOO.cpp which is a wrapper
that includes the actual rcc generated qrc_FOO_CONFIG.cpp file.
This way, after a repeated configuration change, only the wrapper file
qrc_FOO.cpp must be regenerated to include the appropriate
qrc_FOO_CONFIG.cpp file.
|
|
|
|
| |
The configuration suffix was used before it was initialized.
|
| |
|
|
|
|
|
|
|
|
|
| |
Only the dependecies from target_link_libraries() of the origin
target were forwarded to the _autogen target. This patch
adds forwarding of the dependencies from add_dependencies()
to the _autogen target.
Closes #17094
|
|
|
|
|
|
|
|
|
|
| |
This lets AUTOMOC and AUTOUIC process GENERATED files which
used to be ignored before.
A new policy CMP0071 ensures that the old behavior of ignoring
GENERATED files is enabled when the CMake compatibility version
CMAKE_MINIMUM_REQUIRED is < 3.10.
Closes #16186
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change in commit v3.9.0-rc1~464^2~8 (Autogen: Add AUTOMOC/UIC
support for generated source files, 2017-03-02) changes behavior of
existing projects that may not expect `AUTOGEN` on generated files and
do not yet set `SKIP_AUTOGEN` on them. Disable the behavior change for
now to fix the regression for CMake 3.9. We can restore it later with a
policy.
In order to keep the implementation and tests working, add an
undocumented property we can use in the tests to enable the behavior
before the policy is introduced.
Fixes: #17031
Issue: #16186
|
|
|
|
|
|
|
|
|
| |
The change in commit v3.9.0-rc1~42^2~1 (Autogen: Per-config file
suffixes, 2017-05-15) broke Visual Studio builds because the generators
do not yet fully support per-config sources. Disable the behavior on
Visual Studio generators for now.
Fixes: #16939
|