19 Commits

Author SHA1 Message Date
Marc Chevrier
d9b2c7dae2 Introduce memory management helper: cm_memory.hxx 2019-07-14 15:37:30 +02:00
Sebastian Holtermann
71d6a1455e Autogen: Evaluate compiler features for the same exectuable only once
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`.
2019-05-22 12:25:17 +02:00
Sebastian Holtermann
18f7b2ed21 Autogen: Add more frequently used keywords to Keywords class 2019-04-02 20:12:52 +02:00
Sebastian Holtermann
5fb122ff75 Autogen: Add AUTO*_EXECUTABLE strings to Keywords class 2019-04-02 20:12:52 +02:00
Sebastian Holtermann
b32e18fb88 Autogen: Remove static const generator name strings from cmQtAutoGen 2019-04-02 20:12:43 +02:00
Sebastian Holtermann
5431395d68 Autogen: Add cmQtAutogenGlobalInitializer::Keywords class
The new `cmQtAutogenGlobalInitializer::Keywords` class instance is bound to
the lifetime of the `cmQtAutogenGlobalInitializer` instance.  Global static
const strings would be allocated at program start and deallocated at program
end.  Keeping keyword strings alive only in the context where they're
needed helps to reduce the memory footprint.
2019-04-02 20:11:50 +02:00
Sebastian Holtermann
63191b169e Autogen: Use more readable variable names for static const AUTO* strings 2019-02-26 19:33:26 +01:00
Sebastian Holtermann
a4e01d6707 Autogen: Add output caching GetExecutableTestOutput
This adds the cmQtAutoGenGlobalInitializer::GetExecutableTestOutput method
which caches the output of the called executable and returns the cached value
on any subsequent call.
2019-02-19 13:11:44 -05:00
Regina Pfeifer
55671b41d2 clang-tidy: Use = default
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Brad King
e44cc45530 Merge topic 'autogen_adaptive_warning'
5fe18eee13 Autogen: Adaptive missing Qt warning
f2f1661334 Autogen: Add and use QtAutoGen::Tools method
b2343ff086 Autogen: Fix rcc validity check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2806
2019-01-16 09:51:33 -05:00
Bruno Manganelli
cc2a5261f8 Factor out enum MessageType into dedicated header
Reduce the number of files relying on `cmake.h`.
2019-01-16 08:16:31 -05:00
Sebastian Holtermann
5fe18eee13 Autogen: Adaptive missing Qt warning
This makes the warning message for a missing Qt use
the requested Qt version in the message text.
2019-01-15 10:15:03 +01:00
Sebastian Holtermann
f2f1661334 Autogen: Add and use QtAutoGen::Tools method 2019-01-15 09:52:35 +01:00
Sebastian Holtermann
b2343ff086 Autogen: Fix rcc validity check 2019-01-14 17:04:44 +01:00
Sebastian Holtermann
f44a0414ae Autogen: Issue a warning when AUTOMOC/UIC/RCC gets disabled.
We used to silently disable AUTOMOC/UIC/RCC when no valid Qt
version was found.  This patch introduces the generation of
a warning message in that case.
2019-01-10 14:05:33 -05:00
Tobias Hunger
cd32886b2f Autogen: Add AUTO(MOC|RCC|UIC)_EXECUTABLE target properties
Allow to force moc/rcc/uic compiler used for AUTO(MOC|RCC|UIC).

Setting these properties is only necessary if you are going to do
strange things like build these tools as part of your own build system.

Setting these properties will also prevent cmake from testing the
binary: It is user-provided and assumed to be valid.
2019-01-10 08:03:24 -05:00
Tobias Hunger
9045f6a30f Autogen: Prepare for Qt 6
Handle Qt version > 5 in Qt AutoGen.

This patch does *NOT* include tests and documentation: There is no
Qt 6 yet. I still need this patch to work on a cmake based build
system for Qt 6.
2019-01-07 14:13:10 +01:00
Sebastian Holtermann
3baa817c34 Autogen: Add support for global `autogen and autorcc` targets
This teaches CMake the variables

- CMAKE_GLOBAL_AUTOGEN_TARGET
- CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
- CMAKE_GLOBAL_AUTORCC_TARGET
- CMAKE_GLOBAL_AUTORCC_TARGET_NAME

which control the generation of global
``autogen`` and ``autorcc`` targets.

Closes #17721
2018-11-11 14:28:55 +01:00
Sebastian Holtermann
3327d3bb20 Autogen: Add cmQtAutoGenGlobalInitializer class
This moves the global ``AUTOMOC/UIC/RCC`` targets initializer
generation code into a separate new ``cmQtAutoGenGlobalInitializer`` class.
2018-11-11 09:35:28 +01:00