1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-17 01:12:07 +08:00

9 Commits

Author SHA1 Message Date
Sebastian Holtermann
ccc38fa509 Autogen: Protected calls to cmFilePathChecksum
Closes #17861
Closes #17862
2018-04-03 17:20:30 +02:00
Sebastian Holtermann
719b24c872 Autogen: Protected calls to cmQtAutoGen::SubDirPrefix 2018-04-03 17:20:30 +02:00
Sebastian Holtermann
9a73615815 Autogen: Protected calls to cmSystemTools::GetFilenameWithoutLastExtension 2018-04-03 17:20:30 +02:00
Sebastian Holtermann
65203ce407 Autogen: Protected calls to cmSystemTools::Split/JoinPath 2018-04-03 17:20:30 +02:00
Sebastian Holtermann
14a86c9ea7 Autogen: Protected calls to cmSystemTools::CollapseCombinedPath 2018-04-03 17:20:29 +02:00
Sebastian Holtermann
50b7be6d1f Autogen: Check if a file is empty before reading it
Calling `std::string::front()` on an empty string results
in an undefined behavior by the C++ standard.
In gcc8 it causes an assertion to fail.

This adds a check to `AUTOGEN` if a file to read is empty
and in case avoids the use of an empty `std::string` buffer.

Closes #17793
2018-03-06 08:35:08 -05:00
Sebastian Holtermann
a008578dee Autogen: Process files concurrently in AUTOMOC and AUTOUIC
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.
2018-01-17 17:23:49 +01:00
Sebastian Holtermann
3ce7eecedc Autogen: Fix for problematic nested lists separator
In the AutogenInfo.cmake file the separator for nested lists
was `@LSEP@` which led to a speed regression because the `@`
character triggered an (unsuccessful) expression evaluation.

By setting the policy version of the CMake instance in the
`_autogen` target to 3.9, the OLD `@` evaluating behavior
controlled by policy CMP0053 is disabled.

Also the nested lists separator string is changed to `<<<S>>>`,
which solves the problem twofold.

Closes #17570
2017-12-18 14:36:17 +01:00
Sebastian Holtermann
75819b8626 Autogen: Add and use cmQtAutoGenerator base class
Adds the new base class `cmQtAutoGenerator` which contains common
variables and methods used by `cmQtAutoGeneratorMocUic` and
`cmQtAutoGeneratorRcc`.
2017-11-19 12:51:31 +01:00