Commit Graph

23 Commits

Author SHA1 Message Date
Regina Pfeifer
b2aa3aedea clang-tidy: Use default member initialization 2018-12-15 10:52:37 +01:00
Sebastian Holtermann
5f0f84c7e0 Autogen: Don't add a WIN32 moc definition if we have a moc_predefs.h file
On Windows systems we used to add a "-DWIN32" definition to the ``moc``
defines.  This is not necessary anymore when we have a
``moc_predefs.h`` file that provides all compiler predefines.

Closes #18623
2018-11-28 13:07:27 +01:00
Vitaly Stakhovsky
f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const& 2018-09-18 11:16:46 -04:00
Sebastian Holtermann
5776639fbf Autogen: Pass absolute include path in info file 2018-07-30 09:22:46 +02:00
Sebastian Holtermann
e28dc3b1d8 Autogen: Add CMAKE_AUTOGEN_VERBOSE variable support
Setting CMAKE_AUTOGEN_VERBOSE enables verbose output during
AUTOMOC, AUTOUIC and AUTORCC generation.
2018-06-21 19:16:40 +02:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00
Craig Scott
8e841a473f Cleanup: Fix typos and grammar in docs and code
No functional changes, just docs, comments and error messages.
2018-04-23 07:48:03 +10:00
Brad King
49ea1bb243 Merge topic 'autogen-protect-cmsys-calls'
b11e2c80b1 Autogen: Print moc/uic/rcc output to stdout
1d2c9d8c6d Autogen: Use std::istreambuf_iterator for file so string reading
ccc38fa509 Autogen: Protected calls to cmFilePathChecksum
719b24c872 Autogen: Protected calls to cmQtAutoGen::SubDirPrefix
9a73615815 Autogen: Protected calls to cmSystemTools::GetFilenameWithoutLastExtension
65203ce407 Autogen: Protected calls to cmSystemTools::Split/JoinPath
14a86c9ea7 Autogen: Protected calls to cmSystemTools::CollapseCombinedPath

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1918
2018-04-04 11:21:54 -04:00
Sebastian Holtermann
b11e2c80b1 Autogen: Print moc/uic/rcc output to stdout
The output of moc/uic/rcc used to be discarded unless
the program failed. This lets moc/uic/rcc print their
output to stdout even on success.

Closes #17860
2018-04-03 17:20:30 +02:00
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
luz.paz
193082a3c8 MAINT: Misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
2018-02-13 11:24:30 -05:00
Sebastian Holtermann
a8ee7406a7 Autogen: Improved multi-config include scheme
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
2018-02-02 09:10:40 +01:00
Sebastian Holtermann
a1d491ca27 Autogen: AUTOMOC/UIC fix for moc/uic include on the first line
When moc/uic include was found on the first line of
a file it was ignored. This fixes the issue by extending
the regular expression for include detection.

Closes #17655
2018-01-18 18:37:49 +01: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
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Sebastian Holtermann
4043463179 Autogen: Use integers instead of strings for the Qt version 2017-11-19 13:35:07 +01:00
Sebastian Holtermann
2a85b5ac76 Autogen: Make cmQtAutoGeneratorInitializer an instantiable class
Remove the cmQtAutoGenDigest classes and make
cmQtAutoGeneratorInitializer instantiable instead.
2017-11-19 12:51:31 +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
Sebastian Holtermann
27ed3b3537 Autogen: Rename cmQtAutoGenerators to cmQtAutoGeneratorMocUic 2017-11-19 12:51:30 +01:00