Commit Graph

27698 Commits

Author SHA1 Message Date
Brad King
fd2c9fac10 cmGeneratorTarget: Return non-const sources from GetAllConfigSources
We need a non-const pointer to `cmSourceFile` instances in order to
call `GetOrDetermineLanguage` on them.
2019-10-17 14:03:54 -04:00
Brad King
5417737fac Merge topic 'graphviz'
553658393c Graphviz: added test suite, fixes, enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: slodki <slodki_dom@poczta.onet.pl>
Merge-request: !3766
2019-10-17 13:54:26 -04:00
Brad King
ea048ed66c Merge topic 'export-target-lang-name'
0e436c573c install,export: Do not treat language names as target names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3927
2019-10-17 13:52:00 -04:00
Brad King
b903092b31 Merge topic 'vs_dotnet_documentation_file'
89ff3ee779 VS: Add VS_DOTNET_DOCUMENTATION_FILE property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3879
2019-10-17 13:51:11 -04:00
Kitware Robot
095fc6d9d9 CMake Nightly Date Stamp 2019-10-17 00:01:09 -04:00
Brad King
0e436c573c install,export: Do not treat language names as target names
When generating `IMPORTED_LINK_INTERFACE_LANGUAGES`, do not treat the
entries as target names.

Fixes: #19846
2019-10-16 12:48:20 -04:00
Brad King
e0e109611a Merge topic 'swift-cross-compile'
466ad466b4 try_compile: support Swift for cross-compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3921
2019-10-16 09:45:11 -04:00
Kitware Robot
220d599507 CMake Nightly Date Stamp 2019-10-16 00:01:08 -04:00
Saleem Abdulrasool
466ad466b4 try_compile: support Swift for cross-compilation
Ensure that we preserve the `CMAKE_Swift_COMPILER_TARGET` variable to
use cross-compilation for testing the Swift compiler if appropriate.
2019-10-15 13:25:14 -04:00
Charly Mourglia
89ff3ee779 VS: Add VS_DOTNET_DOCUMENTATION_FILE property
Add a `VS_DOTNET_DOCUMENTATION_FILE` target property to tell VS
generators to add a `DocumentationFile` setting in `.csproj` files.

Fixes: #19784
2019-10-15 11:44:55 -04:00
Brad King
dc164bccc1 Merge topic 'cmake-initial-cache-relative'
c9d73b26b0 cmake: Fix relative path regression in -C

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3912
2019-10-15 11:14:09 -04:00
Kitware Robot
daf6a6ba68 CMake Nightly Date Stamp 2019-10-15 00:01:05 -04:00
Peter Waller
c9d73b26b0 cmake: Fix relative path regression in -C
Since commit 4ca0526f8a (cmake: Pass -S and -B into PreLoad.cmake and -C
scripts, 2019-08-20, v3.16.0-rc1~195^2) the value of `CMAKE_SOURCE_DIR`
is the source directory rather than the current working directory.
This was correct on its own, but the place storing that value is also
used as the base for relative paths specified on the command line.
The latter should of course be relative to the current working
directory.

The fix is to switch to use a full path internally, unless a full path
is already specified.  Add tests for the behaviour of `-C` under these
four circumstances:

    {with -S, without -S} x {full path, relative path}

Fixes: #19827
2019-10-14 16:17:00 -04:00
Kitware Robot
30f0319e7f CMake Nightly Date Stamp 2019-10-14 00:01:06 -04:00
Craig Scott
25eef45f16 Merge topic 'feature/CMAKE_MESSAGE_CONTEXT'
7cf79f4419 message: Support logging a context with each message
5bf85e2517 message: Add new CMAKE_MESSAGE_LOG_LEVEL variable
aa59badd6f Tests: Message log level tests must fail on unwanted output
7c579f0a03 Help: Move CMAKE_MESSAGE_INDENT variable to correct section
4b021bd3e9 message: Minor refactor to make code less verbose

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3680
2019-10-13 17:08:44 -04:00
Kitware Robot
001a1d2686 CMake Nightly Date Stamp 2019-10-13 00:01:09 -04:00
Brad King
07d15d70d2 Merge topic 'no-git-version'
874396a30d CMakeVersion: Add option to disable Git suffix
b254b0651e CMakeVersion: Prefer Git information provided by 'git archive' exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3910
2019-10-12 10:29:19 -04:00
Brad King
b727e74fb0 Merge topic 'vs-v142-csharp-flags'
bbf216fb6b VS: Add toolset v142 CSharp flag table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3908
2019-10-12 10:22:21 -04:00
Alex Turbov
7cf79f4419 message: Support logging a context with each message 2019-10-12 18:21:36 +11:00
Alex Turbov
5bf85e2517 message: Add new CMAKE_MESSAGE_LOG_LEVEL variable 2019-10-12 17:01:15 +11:00
Kitware Robot
a8d42ecb8d CMake Nightly Date Stamp 2019-10-12 00:01:14 -04:00
Alex Turbov
4b021bd3e9 message: Minor refactor to make code less verbose 2019-10-12 13:39:55 +11:00
Kyle Edwards
874396a30d CMakeVersion: Add option to disable Git suffix
Distro maintainers who are building from Git with patches added on
may want to disable the automatic Git suffixing, as it does not
provide any useful information and simply confuses the end user.
Add an undocumented CMake_VERSION_NO_GIT variable to disable this.
2019-10-11 14:32:09 -04:00
Brad King
b254b0651e CMakeVersion: Prefer Git information provided by 'git archive' exports
Update the approach from commit fe2c558ba6 (CMakeVersion: Preserve Git
information during 'git archive', 2019-07-25, v3.16.0-rc1~337^2) to
prefer `export-subst` information.  This will allow exported source
trees to be imported into unrelated Git repositories while still using
the original upstream CMake commit information.
2019-10-11 13:49:59 -04:00
Brad King
bbf216fb6b VS: Add toolset v142 CSharp flag table
While the flag tables for C and C++ were generated from MSBuild `.xml`
files, the CSharp flag tables were written by hand.  Copy the `v141`
flag table to use for the `v142` toolset.

Remove the special case added by commit 626c51f47b (VS: Update for
Visual Studio 2019 Preview 2, 2019-01-24, v3.14.0-rc1~74^2) that mapped
the v142 flag table lookup to v141 since we now have the real v142
table.

Fixes: #19828
2019-10-11 11:11:20 -04:00
Brad King
fe9a903d8e Merge topic 'cmake-bin-link-job-pool'
b7509dd674 Add option to configure Ninja link job pool for CMake's own binaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3901
2019-10-11 08:36:57 -04:00
Kitware Robot
696b2d40d4 CMake Nightly Date Stamp 2019-10-11 00:01:07 -04:00
Brad King
b7509dd674 Add option to configure Ninja link job pool for CMake's own binaries
Create an undocumented `CMake_JOB_POOL_LINK_BIN` option that builders
can set to avoid linking too many of our binaries at once.
2019-10-10 13:28:45 -04:00
Brad King
9150c818b7 CMake 3.16.0-rc1 2019-10-10 09:31:05 -04:00
Brad King
e3b9d125ef Merge topic 'deprecate-policy-old'
d00bb419ca Add deprecation warnings for policies CMP0069 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3893
2019-10-10 09:27:06 -04:00
Brad King
d00bb419ca Add deprecation warnings for policies CMP0069 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.9 and below to encourage projects to port away
from setting policies to OLD.
2019-10-10 09:26:10 -04:00
Brad King
2faadaae6b Merge topic 'rename_loglevel_option'
7bbddeb78d CLI: Rename --loglevel to --log-level for naming consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !3899
2019-10-10 09:23:37 -04:00
Brad King
bab7ec3c25 Merge topic 'pch-generate'
36ded610af PCH: Generate sources during Compute step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3890
2019-10-10 09:22:39 -04:00
Brad King
580e322dcb Merge branch 'rename_loglevel_option' into release-3.16
Merge-request: !3899
2019-10-10 09:21:36 -04:00
Craig Scott
7bbddeb78d CLI: Rename --loglevel to --log-level for naming consistency
Other multi-word command line options use hyphens to separate
the words, so the --loglevel option introduced in CMake 3.15 was
inconsistent in this regard. Rename it to --log-level but still support
the original --loglevel name to preserve backward compatibility.
2019-10-10 09:20:50 -04:00
Brad King
e5419f4f87 Merge branch 'pch-generate' into release-3.16
Merge-request: !3890
2019-10-10 09:14:58 -04:00
Kitware Robot
0d1bf3f660 CMake Nightly Date Stamp 2019-10-10 00:01:06 -04:00
Brad King
88fa7b761d Merge branch 'vs-16.4-global-targets' into release-3.16
Merge-request: !3896
2019-10-09 09:19:40 -04:00
Brad King
155d6d8342 Merge branch 'file-GENERATE-earlier' into release-3.16
Merge-request: !3895
2019-10-09 09:19:16 -04:00
Cristian Adam
36ded610af PCH: Generate sources during Compute step 2019-10-09 13:50:25 +02:00
Kitware Robot
6050eca0a4 CMake Nightly Date Stamp 2019-10-09 00:01:06 -04:00
Brad King
5fa1315b03 Merge topic 'file-GENERATE-earlier'
f1fb63b306 file(GENERATE): Create output file structures even earlier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3895
2019-10-08 11:25:08 -04:00
Brad King
6bcc8c1c31 Merge topic 'vs-16.4-global-targets'
9df56ece79 Merge branch 'backport-vs-16.4-global-targets'
ac1a1bf18b VS: Tell VS 16.4 not to verify CMake-provided custom command outputs
04e5f30ad3 VS: Tell VS 16.4 not to verify CMake-provided custom command outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3896
2019-10-08 11:22:55 -04:00
Kitware Robot
ab54653afd CMake Nightly Date Stamp 2019-10-08 00:01:06 -04:00
Corentin Plouet
553658393c Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
  code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
  methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
  and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
  in the graph
* Introduced new flags to control those new libraries (consistent
  with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
2019-10-08 13:45:56 +11:00
Brad King
04e5f30ad3 VS: Tell VS 16.4 not to verify CMake-provided custom command outputs
Extend the fix from commit 0578239d3a (VS: Tell VS 16.4 not to verify
SYMBOLIC custom command outputs, 2019-09-23, v3.15.4~2^2) to apply to
outputs in CMake-provided targets like `install`.  Simply mark these
outputs as `SYMBOLIC` too since they are not actually generated.

Fixes: #19737
2019-10-07 17:41:31 -04:00
Brad King
f1fb63b306 file(GENERATE): Create output file structures even earlier
Since commit b80557c7bd (file(GENERATE): Evaluate early to allow
generating source files, 2014-11-04, v3.2.0-rc1~398^2) we create the
`cmSourceFile` instances marked with a `GENERATED` source file property
before tracing source dependencies.  Move it to even earlier so that
steps in `cmGlobalGenerator::AddAutomaticSources` can operate on all
sources.  This also avoids the accidental `O(n^2)` calls for `n` local
generators that we had previously.

This is also needed since commit 83c1657ff7 (Unity build: Generate
sources during Compute step, 2019-10-03) to support `file(GENERATE)`
outputs as sources in a target with `UNITY_BUILD` enabled.
2019-10-07 15:22:12 -04:00
Brad King
4c29297495 Begin post-3.16 development 2019-10-07 10:57:39 -04:00
Brad King
16613bc050 Begin 3.16 release versioning 2019-10-07 10:53:56 -04:00
Brad King
947b02e2e0 Merge topic 'export-genex-under-prefix'
3ded5b6da8 install,export: Fix export of a genex following $<INSTALL_PREFIX>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3886
2019-10-07 10:34:50 -04:00