Commit Graph

49776 Commits

Author SHA1 Message Date
Brad King
0512e94eb0 Tests: Fix PchInstantiateTemplates case on macOS with CMAKE_OSX_ARCHITECTURES
Update the test added by commit 8c8f03422e (PCH: Template instantiation
support, 2020-08-28) to recognize flags on PCH files whose names include
the architecture.  This occurs when `CMAKE_OSX_ARCHITECTURES` is set.
2020-09-11 08:06:20 -04:00
Kitware Robot
60b10d4fad CMake Nightly Date Stamp 2020-09-11 00:01:15 -04:00
Brad King
48ed3bae58 Merge topic 'pch-instantiate-templates'
8c8f03422e PCH: Template instantiation support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5168
2020-09-10 16:32:39 -04:00
Brad King
e32f4da74a Merge topic 'fix_add_library_documentation'
0a5c3e3b97 Help: add_library(<name> OBJECT) can omit the source files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5212
2020-09-10 16:05:53 -04:00
Brad King
5b3644fba6 Merge branch 'release-3.18' 2020-09-10 16:02:56 -04:00
Brad King
99044f8e16 Merge topic 'gitlab-ci-prefer-mr'
f6a80ffd54 gitlab-ci: Prefer MR rules for any pipeline associated with a MR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5214
2020-09-10 16:02:56 -04:00
Brad King
06cb6a1628 Merge topic 'gitlab-ci-prefer-mr' into release-3.18
f6a80ffd54 gitlab-ci: Prefer MR rules for any pipeline associated with a MR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5214
2020-09-10 16:02:56 -04:00
Brad King
f6a80ffd54 gitlab-ci: Prefer MR rules for any pipeline associated with a MR
GitLab 13.3 started creating MR pipelines in the parent project of a MR
from a fork, at least when the MR submitter is a developer in the parent
project.  If the pipeline is associated with a MR, we should use the
corresponding rules regardless of which project hosts the pipeline.
2020-09-10 15:48:13 -04:00
Deniz Bahadir
0a5c3e3b97 Help: add_library(<name> OBJECT) can omit the source files 2020-09-10 16:59:34 +02:00
Brad King
487c711230 Merge topic 'custom-command-dedup'
45fedf0e17 Makefile: Add policy CMP0113 to avoid duplication of custom commands
844779bdc1 cmMakefileTargetGenerator: Simplify custom command output collection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5204
2020-09-10 10:12:30 -04:00
Brad King
db3efb7568 Merge topic 'json-helpers'
b2f3f831e2 Refactor: Use JSON helpers in CTest resource spec
3f3a30e1e0 JSON: Add helpers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5197
2020-09-10 10:09:42 -04:00
Brad King
2eb7ff09c7 Merge topic 'optimize-old-expand'
62d7acc6d4 cmCommandArgumentParserHelper: rework input handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5208
2020-09-10 09:57:43 -04:00
Brad King
965bf3c904 Merge branch 'release-3.18' 2020-09-10 09:45:53 -04:00
Brad King
9b5f167348 Merge topic 'automoc-rerun-missing-dependency' into release-3.18
9ac3503d30 AutoMoc: Re-run moc if a dependency is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5180
2020-09-10 09:45:52 -04:00
Brad King
8fe4d18e1a Merge topic 'automoc-rerun-missing-dependency'
9ac3503d30 AutoMoc: Re-run moc if a dependency is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5180
2020-09-10 09:45:52 -04:00
Kitware Robot
67355ac5de CMake Nightly Date Stamp 2020-09-10 00:01:13 -04:00
Kyle Edwards
b2f3f831e2 Refactor: Use JSON helpers in CTest resource spec 2020-09-09 12:48:29 -04:00
Brad King
51fc3ac972 Merge topic 'vs9-custom-command-dedup'
066f4d0f0a VS: Avoid unnecessary duplication of custom commands across targets in VS 9
8bb5c96bf8 cmLocalVisualStudio7Generator: Adopt SourcesVisited lookup table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5206
2020-09-09 11:28:20 -04:00
Brad King
7a73164b4a Merge topic 'use-cmprop'
dae5fe8b8f cmConditionEvaluator: More use of cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5190
2020-09-09 11:27:22 -04:00
Brad King
f2e42c8369 Merge topic 'file-real_path'
be36266dab file(): Add REAL_PATH sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5202
2020-09-09 11:26:26 -04:00
Brad King
a09e9f98c0 Merge topic 'fix-crash-21165'
a46fdda464 cmGeneratorTarget: Avoid missing nullptr check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5191
2020-09-09 11:25:25 -04:00
Brad King
8de27c599f Merge topic 'pch-tv90' into release-3.18
ce7c100545 PCH: Fix 30s wait for VS2008 when used via -Tv90

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5199
2020-09-09 11:24:34 -04:00
Brad King
517273c790 Merge branch 'release-3.18' 2020-09-09 11:24:34 -04:00
Brad King
7710c94009 Merge topic 'pch-tv90'
ce7c100545 PCH: Fix 30s wait for VS2008 when used via -Tv90

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5199
2020-09-09 11:24:34 -04:00
Brad King
802584f0c2 Merge topic 'ios-pch-x-lang-header' into release-3.18
8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5188
2020-09-09 11:23:34 -04:00
Brad King
5e0e78b859 Merge branch 'release-3.18' 2020-09-09 11:23:34 -04:00
Brad King
6d77487eb7 Merge topic 'ios-pch-x-lang-header'
8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5188
2020-09-09 11:23:34 -04:00
Oleksandr Koval
62d7acc6d4 cmCommandArgumentParserHelper: rework input handling
Old implementation uses involved Flex input management technique that
requires usage of obsolete YY_INPUT macro. This causes a lot of useless
allocations and byte-by-byte scanning. New implementation avoids those
hacks, it uses yy_scan_string() API to setup Flex input. Also it fixes
reporting of syntax error position and corresponding tests.
2020-09-09 15:49:35 +03:00
Kyle Edwards
3f3a30e1e0 JSON: Add helpers 2020-09-09 08:29:02 -04:00
Kyle Edwards
e366977e62 Merge topic 'cmstrlen'
0c9cdf30ed cmStringAlgorithms: Add cmStrLen()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5201
2020-09-09 08:21:26 -04:00
Joerg Bornemann
9ac3503d30 AutoMoc: Re-run moc if a dependency is missing
AutoMoc uses the moc-emitted dependency file of Qt 5.15 to track
dependencies. Such a dependency may well live outside the project and
can vanish, for example when installing a new compiler version.

This situation was detected before, but merely a warning was issued.
Now, we're considering a generated file as out of date if a dependency
is missing and re-generate it.

We also have to remove the missing dependency from the ParseCache.
Otherwise the AUTOMOC target for all generators other than Ninja will
always be out of date.

The ParseCacheChanged flag had to be made atomic, because we're
potentially accessing it from multiple threads. The dependencies vector
itself is not vulnerable in this regard, because there's one vector per
file, and we're accessing exactly one ParseCacheT::FileHandleT per thread.

Fixes: #21136
2020-09-09 12:51:28 +02:00
Kitware Robot
9a0a5f8420 CMake Nightly Date Stamp 2020-09-09 00:01:18 -04:00
Brad King
8ec7edf563 Merge topic 'ExternalData-doc-typo'
1ad991a13e Help: correct typo in ExternalData (duplicate "of")

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5196
2020-09-08 15:45:41 -04:00
Brad King
45fedf0e17 Makefile: Add policy CMP0113 to avoid duplication of custom commands
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies.  The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.

This may break existing projects that do not properly mark non-created
outputs with the `SYMBOLIC` property.  Previously a chain of two custom
commands whose intermediate dependency is not created would put both
commands in a dependent project's Makefile even if the first command is
also in its dependency's Makefile.  The first command would run twice
but the build would work.  Now the second command needs an explicit
`SYMBOLIC` mark on its input to tell CMake that it is not expected to
exist.  To maintain compatibility with projects that left out the mark,
add a policy activating the behavior.
2020-09-08 15:38:40 -04:00
Brad King
844779bdc1 cmMakefileTargetGenerator: Simplify custom command output collection 2020-09-08 15:38:40 -04:00
Brad King
b1b345c21a Merge topic 'ispc_tests_run_on_older_hw'
c83711d9bd ISPC tests will now run on any hardware that only supports SSE2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5205
2020-09-08 15:11:52 -04:00
Brad King
066f4d0f0a VS: Avoid unnecessary duplication of custom commands across targets in VS 9
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies.  The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.

The same change was already made by commit f59c33a763 (VS: Generate a
custom command only in the least dependent target, 2018-03-23,
v3.12.0-rc1~171^2) for VS 10+.
2020-09-08 14:52:22 -04:00
Brad King
8bb5c96bf8 cmLocalVisualStudio7Generator: Adopt SourcesVisited lookup table
Move it up the hierarchy from `cmLocalVisualStudio10Generator`.
Propagate contents from a target's dependencies as part of the main
target iteration logic instead of as part of the generator-specific
target generation.
2020-09-08 14:52:22 -04:00
Robert Maynard
c83711d9bd ISPC tests will now run on any hardware that only supports SSE2
Previously we expected AVX1 support.
2020-09-08 14:51:56 -04:00
Marc Chevrier
be36266dab file(): Add REAL_PATH sub-command 2020-09-08 18:33:57 +02:00
vvs31415
a46fdda464 cmGeneratorTarget: Avoid missing nullptr check
Revise logic in `ComputeOutputDir` that was previously missing
a check for nullptr before constructing a `std::string`.

Fixes: #21165
2020-09-08 12:20:28 -04:00
vvs31415
dae5fe8b8f cmConditionEvaluator: More use of cmProp 2020-09-08 12:19:34 -04:00
Brad King
503d0f80e1 Merge topic 'generate-target-order'
aea465793e cmLocalVisualStudio7Generator: Consolidate target iteration
1527242745 cmLocalVisualStudio10Generator: Simplify target ordering by dependencies
48bf7192e7 cmLocalVisualStudio7Generator: Generate targets in dependency order
17aba9c9a6 cmLocalUnixMakefileGenerator3: Generate targets in dependency order
69ee18163b cmLocalGhsMultiGenerator: Generate targets in dependency order
c4e296a609 cmGlobalGenerator: Compute a global target ordering respecting dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5187
2020-09-08 11:25:17 -04:00
Brad King
d0ccc7cf2a Merge topic 'ispc_improvements'
a020787a9b ISPC: Support generation for multiple instruction sets
5a1750017e ISPC: Add compiler launcher support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5173
2020-09-08 11:19:28 -04:00
Brad King
b63f508e4d Merge topic 'GetExecutionListFile-by-ref'
879bd7fd9c cmStateSnapshot: Return const reference from GetExecutionListFile()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5186
2020-09-08 11:18:28 -04:00
Brad King
0bd9640968 Merge topic 'optimize-cmJoin'
38928ee3ee cmStringAlgorithms: Add faster cmJoin overloads for strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5185
2020-09-08 11:17:29 -04:00
Brad King
679b5512bd Merge branch 'release-3.18' 2020-09-08 11:13:49 -04:00
Brad King
df226895f5 Merge topic 'FindPython-set-CMP0012-NEW'
0670797d71 FindPython: CMP0012 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5198
2020-09-08 11:13:49 -04:00
Brad King
0834b8b8cb Merge topic 'FindPython-set-CMP0012-NEW' into release-3.18
0670797d71 FindPython: CMP0012 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5198
2020-09-08 11:13:48 -04:00
Brad King
8ed0d686d4 Merge topic 'doc-cmake_path'
2b51cc5481 Help: Fix typo in cmake_path(CMAKE_PATH) command signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5203
2020-09-08 10:59:59 -04:00