Commit Graph

27665 Commits

Author SHA1 Message Date
Brad King fb8341c35e Merge topic 'prepare-genex-in-byproducts'
a583b7bc17 Genex: Evaluate byproduct generator expressions in cmCustomCommandGenerator
ccc9685cc1 Genex: Move genex expansion of paths into AppendPaths utility
026ef9b312 Refactoring: Use ConfigName instead of property CMAKE_BUILD_TYPE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3797
2019-09-20 10:23:13 -04:00
Brad King 4ade1b00c5 Merge topic 'fileapiLinkPathAndLinkDirBacktraces'
4d6334824d fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIES
5bd65dff7a cmLocalGenerator: Add OutputLinkLibraries overload with backtraces
5d39e792ae cmGeneratorTarget: Store backtrace for target LINK_DIRECTORIES property
7da17ef797 cmLinkLineComputer: Add ComputeLinkLibraries overload with backtraces
d4d0dd0f6a cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces
0ac9dcb807 cmLinkLineComputer: Add ComputeLinkPath overload with backtraces
0c6468178a cmComputeLinkInformation: Add GetDirectoriesWithBacktraces
a209b31d0d cmComputeLinkInformation: Add AppendValues with backtraces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3805
2019-09-20 10:22:01 -04:00
Brad King 7cf36407be Merge topic 'update-kwsys'
c578caa68b Tests: Decouple Plugin test from KWSys
56879273dc Merge branch 'upstream-KWSys' into update-kwsys
3327c0402a KWSys 2019-09-18 (c6bc38c1)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3828
2019-09-20 10:12:56 -04:00
Marc Chevrier c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Regina Pfeifer 0aa8a2ab8b cmCTest*Command: Port to cmArgumentParser 2019-09-20 13:27:30 +02:00
Regina Pfeifer d5a6a13368 cmArgumentParser: Record parsed keywords 2019-09-20 13:27:30 +02:00
Kitware Robot 75b2c9717c CMake Nightly Date Stamp 2019-09-20 00:01:06 -04:00
Vedran Vujinovic acdb326610 VS: Do not reference output assemblies of targets with no output
Our logic that sets `ReferenceOutputAssembly` in `ProjectReference` has
accumulated a series of conditions for different cases in which the
referenced target has no output.  Simplify the condition to check
`GetManagedType` directly for cases with no output.

This will explicitly turn off `ReferenceOutputAssembly` in
`ProjectReference` for utility (i.e. `add_custom_target`) and special
targets (i.e. `ZERO_CHECK`, etc.), and allowing reference of target
dependencies that produce some output.

Fixes: #19665
2019-09-19 11:47:15 -04:00
Brad King 9c31d83aa2 Merge topic 'autogen_path_prefix'
cc0900d9cd Help: Add release notes for AUTOMOC_PATH_PREFIX
692d8e3492 Help: Add documentation for AUTOMOC_PATH_PREFIX
1933ade9f1 Tests: At QtAutogen.MocIncludeSymlink test
706d9738a6 Tests: Merge QtAutogen.MocIncludeStrict and MocIncludeRelaxed
d018d27c10 Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX)
77983c8147 Autogen: Add IsHeader flag to SourceFileT class
f9e5441eb4 Autogen: Abbreviate file paths in messages
51676cf655 Autogen: Split JobEvalCacheT job into separate moc and uic jobs
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3818
2019-09-19 11:19:52 -04:00
Brad King e199294673 Merge topic 'refactor-string-concat'
9dba84cfa5 Refactor: Use cmStrCat to construct error strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3734
2019-09-19 11:10:40 -04:00
Tushar Maheshwari 71f088f53a cmExportSet: subsume cmExportSetMap source files 2019-09-19 19:20:30 +05:30
Tushar Maheshwari 6511fa6f33 cmExportSet: default destructor 2019-09-19 19:20:29 +05:30
Tushar Maheshwari 9b8a1f7c28 cmExportSetMap: improve ownership of cmExportSet
- use `std::piecewise_construct` to fix gcc-4.8 build.
- can use `emplace(name, name)` gcc-6 onwards.
2019-09-19 19:20:29 +05:30
Cristian Adam 9d2ac86f45 Precompile Headers: Add precompile header file to source list
The precompile header file will be added to the list of files,
and be part of the newly "Precompile Header File" source group.

Also make sure the sources have the header as dependency.
2019-09-19 13:23:00 +02:00
Kitware Robot 0772d15c2c CMake Nightly Date Stamp 2019-09-19 00:01:06 -04:00
Tushar Maheshwari 14da7aedf2 cmComputeLinkDepends: remove manual memory deallocation
- Replace owning raw `DependSetList` pointer with direct object.
- Use an extra `bool Initialized` flag to imitate `nullptr` semantics.
2019-09-18 14:32:56 -04:00
Asit Dhal 9dba84cfa5 Refactor: Use cmStrCat to construct error strings
Replace string construction using std::stringstream with cmStrCat and
cmWrap.
2019-09-18 14:18:46 -04:00
Justin Goshi 4d6334824d fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIES 2019-09-18 14:00:39 -04:00
Justin Goshi 5bd65dff7a cmLocalGenerator: Add OutputLinkLibraries overload with backtraces 2019-09-18 14:00:39 -04:00
Justin Goshi 5d39e792ae cmGeneratorTarget: Store backtrace for target LINK_DIRECTORIES property 2019-09-18 14:00:39 -04:00
Justin Goshi 7da17ef797 cmLinkLineComputer: Add ComputeLinkLibraries overload with backtraces 2019-09-18 14:00:37 -04:00
Justin Goshi d4d0dd0f6a cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces 2019-09-18 13:59:36 -04:00
Justin Goshi 0ac9dcb807 cmLinkLineComputer: Add ComputeLinkPath overload with backtraces 2019-09-18 13:59:07 -04:00
Brad King 1423507a71 Merge topic 'command-line-make-functions'
9c45b95ddd cmMakefile: Remove unused AddUtilityCommand overload
7f3ecbe7d7 cmCustomCommandLine: Provide command line make functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3819
2019-09-18 11:52:14 -04:00
Kyle Edwards 01cce69870 Merge topic 'smart_ptr/cmCPackGeneratorFactory'
c9c1eb99fe cmCPackGeneratorFactory: rule of zero

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3826
2019-09-18 11:36:03 -04:00
Brad King a981a9a745 Merge topic 'shared-pch'
729d997f10 Precompile Headers: Add REUSE_FROM signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rickard Englund <rickard@r-englund.com>
Acked-by: Viktor Kirilov <vik.kirilov@gmail.com>
Merge-request: !3762
2019-09-18 11:34:00 -04:00
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