Commit Graph
28539 Commits
Author SHA1 Message Date
Justin Goshi 0c6468178a cmComputeLinkInformation: Add GetDirectoriesWithBacktraces 2019-09-18 09:58:41 -04:00
Justin Goshi a209b31d0d cmComputeLinkInformation: Add AppendValues with backtraces 2019-09-18 09:57:30 -04:00
Brad King 56879273dc Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2019-09-18 (c6bc38c1)
2019-09-18 09:26:40 -04:00
Kitware Robot 45b7d5284e CMake Nightly Date Stamp 2019-09-18 00:01:07 -04:00
Daniel Eiband a583b7bc17 Genex: Evaluate byproduct generator expressions in cmCustomCommandGenerator
Evaluate and expand generator expressions in byproducts of custom commands.

Note that it is still not possible to use generator expressions in byproducts
of the commands `add_custom_command` and `add_custom_target`.  These commands
still reject the input.  This is a preparation step for OUTPUT generator
expression support.

Issue: #12877
2019-09-17 22:58:31 +02:00
Daniel Eiband ccc9685cc1 Genex: Move genex expansion of paths into AppendPaths utility
Refactored internals of cmCustomCommandGenerator to make processing of path
lists (evaluation of generator expressions and expansion into a list) available
as AppendPaths utility function to be used for byproduct generator expression
support.
2019-09-17 22:58:31 +02:00
Daniel Eiband 026ef9b312 Refactoring: Use ConfigName instead of property CMAKE_BUILD_TYPE
Use memorized `this->ConfigName` instead of retrieving the value of property
CMAKE_BUILD_TYPE.
2019-09-17 22:58:31 +02:00
Daniel Eiband 0e1faa28cb cmMakefile: Separate custom command setup from actual creation
Refactor custom command manipulation functions to consist of a setup and a
commit stage.  The commit stage will be delayed to generate time.
2019-09-17 22:52:32 +02:00
Daniel Eiband 56c204e8eb cmMakefile: Refactor AddCustomCommandOldStyle to be delay friendly
Custom command functions consist of two parts: setup and commit.  Only the
commit part will be delayed to generate time.  This change puts the commit part
of AddCustomCommandOldStyle into a lambda.  When delayed, it will not be
possible to break the loop over the outputs if an error occurs which seems
reasonable.
2019-09-17 22:52:32 +02:00
Daniel Eiband e893ab94ba cmMakefile: Validate command line for all custom commands 2019-09-17 22:50:25 +02:00
Daniel Eiband f1e846fdde cmMakefile: Extract custom command validation method 2019-09-17 22:50:25 +02:00
Daniel Eiband 4926ab2454 cmMakefile: Create all generated byproducts as known sources 2019-09-17 22:50:25 +02:00
Tushar Maheshwari c9c1eb99fe cmCPackGeneratorFactory: rule of zero 2019-09-17 13:05:26 -04:00
Brad King e6ddb57479 Merge topic 'byproduct-collapse-full-path'
3b409643bd Byproducts: Add test for collapsing of full paths in byproducts
445ff5ccdf Byproducts: collapse full paths of custom target byproducts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3804
2019-09-17 11:12:08 -04:00
Brad King 14fb0f3967 Merge topic 'smart_ptr/cmSourceFile'
8c83f39a90 cmSourceFile: use unique_ptr for CustomCommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !3815
2019-09-17 11:11:06 -04:00
Cristian Adam 729d997f10 Precompile Headers: Add REUSE_FROM signature
Add the ability to share precompiled headers artifacts between
targets.

Fixes: #19659
2019-09-17 11:58:38 +02:00
Kitware Robot 3bc1feae5f CMake Nightly Date Stamp 2019-09-17 00:01:08 -04:00
Daniel Eiband 9c45b95ddd cmMakefile: Remove unused AddUtilityCommand overload 2019-09-16 20:45:56 +02:00
Daniel Eiband 7f3ecbe7d7 cmCustomCommandLine: Provide command line make functions
Reduce boilerplate necessary to create custom command lines by introducing and
applying cmMakeCommandLine and cmMakeSingleCommandLine functions.
2019-09-16 20:45:41 +02:00
Sebastian Holtermann d018d27c10 Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX)
The new `AUTOMOC_PATH_PREFIX` boolean target property enables automatic
generation of the path prefix `-p` option for `moc`.
`AUTOMOC_PATH_PREFIX` is initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which is ON by default.

When `AUTOMOC_PATH_PREFIX` is enabled, CMake tests if a `moc`ed header file is
in one of the include directories.  If so, then the `-p` option, with the
relative path of the header parent directory to the respective include
directory, is added to the `moc` command.  If the header file is not in an
include directory, the `-p` option is omitted.

Closes: #18815 "AUTOMOC: generated files include full relative path,
                breaking certain reproducible builds"
2019-09-16 18:18:48 +02:00
Sebastian Holtermann 77983c8147 Autogen: Add IsHeader flag to SourceFileT class 2019-09-16 18:18:48 +02:00
Sebastian Holtermann f9e5441eb4 Autogen: Abbreviate file paths in messages
This introduces the `cmQtAutoGenerator::MessagePath` method, that abbreviates
paths by placing a
 - "SRC:" prefix in place of the project source directory
 - "BIN:" prefix in place of the project binary directory

The method is used in `AUTO{MOC,UIC,RCC}` when paths are displayed in
messages.  This makes the messages generated by `AUTO{MOC,UIC,RCC}` shorter
and improves their readability.
2019-09-16 18:18:48 +02:00
Sebastian Holtermann 51676cf655 Autogen: Split JobEvalCacheT job into separate moc and uic jobs
This splits the `JobEvalCacheT` job into separate `JobEvalCacheMocT` and
`JobEvalCacheUicT` classes, that run concurrently.
The `JobEvalCache*T::FindIncluded*` methods are overhauled to store probed
directoriy names only if probing fails.  Warning messages are refactored
to show the file name and the probed directories instead of all probed file
paths.  This is easier to read.
2019-09-16 18:18:48 +02:00
Sebastian Holtermann 1a3f185c1a Autogen: Split JobProbeDepsT job into separate moc and uic jobs
By splitting `JobProbeDepsT` into two independent `JobProbeDepsMocT`,
`JobProbeDepsUicT`, the moc and uic job generation will happen concurrently.
This should improve the execution speed, when both AUTOMOC and AUTOUIC are
enabled.

Parent directory names for moc and uic output files are are collected in
a `std::unordered_set<std::string>` and get created in a batch.
Beforehand we tried to create the parent directory for each output file.
This led to duplications of `MakeDirectory` calls when there were multiple
output files in the same directory (which is the case usually).
2019-09-16 18:18:48 +02:00
Sebastian Holtermann 726ea1d151 Autogen: Rename job classes 2019-09-16 18:18:48 +02:00
Sebastian Holtermann 05126d23f6 Autogen: Remove CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE sort duplication
This removes code that sorts include directories for `AUTOMOC` according to
`CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE`.  This is possible because the
included directories passed to `AUTOMOC` are already sorted, also with
respect to `CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE`.
2019-09-16 18:18:48 +02:00
Sebastian Holtermann f54c5ee521 Autogen: Use CollapseFullPath instead of RealPath to support symbolic links 2019-09-16 18:18:48 +02:00
Sebastian Holtermann 65c49e0e26 Autogen: Sanitize include and search directories 2019-09-16 18:18:48 +02:00
Sebastian Holtermann dad1a6b3fb Autogen: Modernize by using an unnamed namespace instead of static functions 2019-09-16 18:18:48 +02:00
Sebastian Holtermann 8209691146 Autogen: Compute and store generator pointers once in initializer constructor 2019-09-16 18:18:44 +02:00
Brad King 1ac4e0ef1b Merge topic 'tidy-deprecated-headers'
f30523d090 clang-tidy: modernize-deprecated-headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3792
2019-09-16 10:25:53 -04:00
Brad King 7c47894b45 Merge topic 'prepare-deferred-custom-command-creation'
5d28e361b7 add_custom_command: Move append functionality into class cmMakefile
4fb29850ad add_custom_command: Refactor setting implicit depends

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3810
2019-09-16 10:18:51 -04:00
Brad King 1df2f8803b Merge topic 'add_custom_command-genex-slash'
c16641607f add_custom_command: Delay slash conversion until after genex evaluation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3791
2019-09-16 10:17:22 -04:00
Brad King 3358871483 Merge topic 'remove-unused-class'
7bf8eb7877 Remove unused cmInstallExportAndroidMKGenerator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3812
2019-09-16 10:15:37 -04:00
Regina Pfeifer f30523d090 clang-tidy: modernize-deprecated-headers 2019-09-16 10:11:13 -04:00
Kitware Robot bfa2eaa617 CMake Nightly Date Stamp 2019-09-16 00:01:06 -04:00
Kitware Robot c6ed044319 CMake Nightly Date Stamp 2019-09-15 00:01:05 -04:00
Kitware Robot 80329771fe CMake Nightly Date Stamp 2019-09-14 00:01:05 -04:00
Tushar Maheshwari 8c83f39a90 cmSourceFile: use unique_ptr for CustomCommand 2019-09-14 00:54:31 +05:30
Tushar Maheshwari 7bf8eb7877 Remove unused cmInstallExportAndroidMKGenerator
This class was added by commit 42ce9f1e71 (Add support for creating
prebuilt Android.mk files, 2016-07-12, v3.7.0-rc1~126^2) but not used.
2019-09-13 13:24:45 -04:00
Daniel Eiband 445ff5ccdf Byproducts: collapse full paths of custom target byproducts
Collapse full paths of add_custom_target command byproducts for symmetry with
byproducts passed to the add_custom_command command.
2019-09-13 18:09:23 +02:00
Daniel Eiband 5d28e361b7 add_custom_command: Move append functionality into class cmMakefile 2019-09-13 11:00:21 -04:00
Sebastian Lipponer c16641607f add_custom_command: Delay slash conversion until after genex evaluation
Generator expressions may contain or produce backslashes.

Fixes: #19553
2019-09-13 10:56:26 -04:00
Brad King 19bcdca93c Merge topic 'target-level-dependencies-via-byproducts'
482d858500 Depend: Add test for target-level dependencies via byproducts
f6574c9a81 Depend: Hook up automatic target-level dependencies via byproducts
2edb0b71ed cmMakefile: Add lookup from source name to targets via byproducts
62d5932389 Refatoring: Extract AnyOutputMatches utility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3806
2019-09-13 09:56:20 -04:00
Brad King 0b8c0b26ce Merge topic 'cpack-wix-start-menu'
d69457077d CPackWIX: Allow omitting program menu folder and uninstall shortcut

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3802
2019-09-13 09:53:41 -04:00
Brad King bacb50afa9 Merge topic 'free-free-set-them-free'
a81e9a0ced cmSubdirCommand: Port away from cmCommand
573cd4e4b4 cmSetTestsPropertiesCommand: Port away from cmCommand
95f23ea5d5 cmSetSourceFilesPropertiesCommand: Port away from cmCommand
706400d417 cmRemoveDefinitionsCommand: Port away from cmCommand
7f86990262 cmQTWrapUICommand: Port away from cmCommand
56bfb8de5d cmQTWrapCPPCommand: Port away from cmCommand
83b3f76a3b cmLinkLibrariesCommand: Port away from cmCommand
b85407ae76 cmInstallTargetsCommand: Port away from cmCommand
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3807
2019-09-13 09:52:34 -04:00
Kitware Robot 729c928c7b CMake Nightly Date Stamp 2019-09-13 00:01:11 -04:00
Daniel Eiband 4fb29850ad add_custom_command: Refactor setting implicit depends
Implicit dependencies are now passed as argument to AddCustomCommandToOutput.
This is necessary to be able to delay custom command creation.
2019-09-12 23:00:36 +02:00
Regina Pfeifer a81e9a0ced cmSubdirCommand: Port away from cmCommand
Ref: #19499
2019-09-12 18:16:17 +02:00
Regina Pfeifer 573cd4e4b4 cmSetTestsPropertiesCommand: Port away from cmCommand
Ref: #19499
2019-09-12 18:16:17 +02:00