Pavel Solodovnikov
7d5095796a
Meta: modernize old-fashioned loops to range-based for
.
...
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
2017-09-12 16:22:47 +03:00
Sebastian Holtermann
c330d641af
Autogen: Replace CM_AUTO_PTR with std::unique_ptr
2017-09-07 18:03:14 +02:00
Sebastian Holtermann
9468e926b0
Autogen: Refactor logging
2017-09-07 18:03:13 +02:00
Sebastian Holtermann
d561c1fffc
Autogen: More use of scoped lambdas
2017-09-07 18:03:13 +02:00
Sebastian Holtermann
db80367c91
Autogen: Use scoped lambdas intead of named functions
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
ed216b32a5
Autogen: Touch moc_predefs.h when it's content didn't change
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
f23a24c287
Autogen: Use list of lists functions for UIC options
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
37ef18a468
Autogen: Pass RCC build names and function names in info file
...
- 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.
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
761b3d7974
Autogen: Add functions to read/write a list of lists
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
84658539bc
Autogen: Use single KeyRegExp filter struct
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
d8d064abbc
Autogen: Use the same algorithm for RCC and UIC option merging
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
37714f884b
Autogen: Replace cmsys::SystemTools:: with cmSystemTools::
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
d1e5eb8497
Autogen: Iterate source files only once
...
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.
2017-09-07 17:53:18 +02:00
Daniel Pfeifer
2b4c32c95f
clang-format: format all code as Cpp11
2017-08-30 11:07:05 -04:00
Daniel Pfeifer
ca2233e31f
IWYU: Mark cmConfigure.h with pragma: keep
...
Also remove `#include "cmConfigure.h"` from most source files.
2017-08-26 07:41:04 +02:00
Daniel Pfeifer
5962db4389
Use C++11 nullptr
2017-08-24 23:39:47 +02:00
Sebastian Holtermann
93f0ba2823
Autogen: Add AUTOMOC_MACRO_NAMES support
...
Closes #17176
2017-08-18 12:32:04 +02:00
Brad King
6c5e03d6d4
Merge branch 'backport-autogen-autouic-lookup' into autogen-autouic-lookup
2017-08-15 13:23:11 -04:00
Sebastian Holtermann
02e6c54813
Autogen: Restore AUTOUIC lookup paths from 3.8.2
...
When encountering an `#include "<PATH>ui_<BASE>.h"` statement,
search for `<BASE>.ui` in
- <SOURCE_DIR>/<BASE>.ui
- <SOURCE_DIR>/<PATH><BASE>.ui
- <AUTOUIC_SEARCH_PATH>/<BASE>.ui
- <AUTOUIC_SEARCH_PATH>/<PATH><BASE>.ui
In CMake 3.8.2 the lookup list was
- <SOURCE_DIR>/<BASE>.ui
In CMake 3.9.[01] the lookup list was
- <SOURCE_DIR>/<PATH><BASE.ui>
- <AUTOUIC_SEARCH_PATH>/<PATH><BASE>.ui
Closes #17168
2017-08-15 12:17:37 +02:00
Matthias Kuhn
53640a4610
Autogen: Only print Qt Autogenerator messages when verbose
...
Unconditionally printing these messages prevents ninja builds from
filtering successful commands and only show errors and warnings.
Fix #17157
2017-08-12 09:29:36 +02:00
Brad King
03469889f6
Merge topic 'autogen-create-include-dir'
...
6a0605c7
Autogen: Always create AUTOMOC/AUTOUIC include directory
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1113
2017-08-10 09:21:42 -04:00
Sebastian Holtermann
6a0605c711
Autogen: Always create AUTOMOC/AUTOUIC include directory
...
The **AUTOGEN** include directory was always passed to the compiler but
only generated on demand. To avoid compiler complaints when using
`-Wmissing-include-dirs` make sure the directory gets created always.
Closes #17147
2017-08-08 12:11:10 +02:00
Sebastian Holtermann
6d83757f26
Autogen: Generate rcc wrapper file on demand
...
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.
2017-08-05 14:21:50 +02:00
Sebastian Holtermann
74a1b8ebde
Autogen: Fix configuration suffix initialization
...
The configuration suffix was used before it was initialized.
2017-08-05 12:46:10 +02:00
Sebastian Holtermann
ddd6f0db1e
Autogen: Add per-config suffix to moc_predefs.h
...
moc_predefs.h is generated using per-config -D definitions
and therefore must be configuration specific as well.
2017-08-05 12:27:11 +02:00
Sebastian Holtermann
e2c9cf12d1
Autogen: Remove per-config suffix for mocs_compilations.cpp
2017-08-05 12:08:14 +02:00
Brad King
a49b235db9
Merge topic 'autogen_skip_included'
...
ecac50e1
Autogen: Skip included files on demand
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1039
2017-07-11 07:35:56 -04:00
Sebastian Holtermann
ecac50e133
Autogen: Skip included files on demand
2017-07-10 13:36:48 +02:00
Brad King
3572548eb3
Merge topic 'autogen_p'
...
251bcbed
Autogen: Continue search for FOO_p.h when FOO.h was found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1022
2017-07-06 10:13:25 -04:00
Brad King
cf9a994d9a
Merge branch 'autogen_p' into release-3.9
2017-07-05 10:29:27 -04:00
Brad King
a57b353750
Merge topic 'autogen-header-skip'
...
83d8acee
Autogen: Check .moc header name against SKIP list
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1017
2017-07-05 10:11:00 -04:00
Sebastian Holtermann
251bcbed72
Autogen: Continue search for FOO_p.h when FOO.h was found
2017-07-02 22:54:35 +02:00
Sebastian Holtermann
83d8aceeb3
Autogen: Check .moc header name against SKIP list
...
When encountering an #include "FOO.moc" statement where
FOO.hpp was chosen over FOO.cpp as the moc source, the
FOO.hpp name was not checked against the moc SKIP list.
2017-06-30 12:53:24 -04:00
Sebastian Holtermann
01d2b745aa
Autogen: Check for Q_OBJECT/Q_GADGET after brace
...
Closes #16971
2017-06-20 10:49:00 +02:00
Sebastian Holtermann
dbda590628
Autogen: Per-config file suffixes. New AUTOGEN_BUILD_DIR target property.
...
Closes #14760
Closes #14313
2017-05-26 15:27:17 +02:00
Sebastian Holtermann
0965002e57
Autogen: Pass build directory in Info file
2017-05-26 15:23:21 +02:00
Sebastian Holtermann
b95fbbe553
Autogen: Add -DWIN32 to definitions list on demand
2017-05-13 10:25:46 +02:00
Sebastian Holtermann
ab39dd11f5
Autogen: Include moc/uic/rcc binary in settings hash
2017-05-13 10:14:23 +02:00
Daniel Pfeifer
c36d63cd48
cmake: initialize with Role that controls which commands to register
2017-05-08 22:29:44 +02:00
Sebastian Holtermann
97d25404f3
Autogen: Use FileWrite to write the settings file
2017-04-22 15:12:45 +02:00
Sebastian Holtermann
d040459679
Autogen: Save the hash of the old settings string only
2017-04-22 14:54:34 +02:00
Sebastian Holtermann
7c5f5f1a20
Autogen: Generate moc_predefs.h only on demand
2017-04-22 14:39:50 +02:00
Sebastian Holtermann
1d5ed679ce
Autogen: Uppercase function name
2017-04-22 14:28:13 +02:00
Sebastian Holtermann
e4a235653f
Autogen: New QuotedCommand function for logging
2017-04-22 14:28:13 +02:00
Sebastian Holtermann
9d9e17fa21
Autogen: Use FileDiffers and FileWrite for AUTOMOC
2017-04-22 14:08:57 +02:00
Sebastian Holtermann
65290169f2
Autogen: Add FileDiffers and FileWrite methods
2017-04-22 14:01:18 +02:00
Sebastian Holtermann
344a6d8448
Autogen: MakeParentDirectory logPrefix parameter
2017-04-22 13:30:28 +02:00
Sebastian Holtermann
5965a58915
Autogen: Determine settings file name only once
2017-04-22 13:21:18 +02:00
Sebastian Holtermann
46ba6abe49
Autogen: Overhaul class variable names and sorting
2017-04-22 13:21:18 +02:00
Brad King
2b7aecba16
Merge topic 'autogen-fixes'
...
09035319
Autogen: Pass explicit predefines header to moc if possible
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !671
2017-04-21 08:43:43 -04:00