Commit Graph

14 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Brad King
f8bc8780c1 CMP0026: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Vitaly Stakhovsky
58da4aa47d Source: Avoid comparing pointers to nullptr 2024-08-27 10:56:38 -04:00
Brad King
ff1693cb3c cmGeneratorTarget: Clarify enum for specifying purpose of usage requirements
Since commit 1e49880472 (cmGeneratorTarget: Avoid boolean trap in usage
requirement lookup, 2021-12-08, v3.23.0-rc1~245^2) we have clarified
the distinction between compile-only and link-only usage requirements.
Rename the `LinkInterfaceFor` enum to `UseTo` to clarify that its role
is to specify the purpose of usage requirements.
2024-05-03 13:04:10 -04:00
Brad King
662d4c5315 cmGeneratorTarget: Clarify name for evaluating compile-only usage requirements 2024-05-03 13:04:09 -04:00
Rose
aaeb2e0aa8 cmLinkItemGraphVisitor: Remove unnecessary syntax 2023-10-23 11:14:54 -04:00
Brad King
73337cb383 LINK_LIBRARIES: Evaluate separately for linking and usage requirements
We evaluate `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` for two purposes:

* Constructing the link line.
* Collecting usage requirements.

We evaluate `INTERFACE_LINK_LIBRARIES` separately for each purpose in
order to support the `$<LINK_ONLY:...>` generator expression used to
express private link dependencies of a static library.  Previously we
only evaluated `LINK_LIBRARIES` for linking, and used that result for
collecting usage requirements too.  Therefore `$<LINK_ONLY:...>` does
not work in `LINK_LIBRARIES`.

With the introduction of `INTERFACE_LINK_LIBRARIES_DIRECT`, evaluation
of `LINK_LIBRARIES` now needs to distinguish these two cases in order to
honor link dependencies encountered through `$<LINK_ONLY:...>` without
also exposing other usage requirements through private dependencies of a
static library.  Revise internal infrastructure to distinguish the two
cases when evaluating `LINK_LIBRARIES`.  Make the information available
in code paths for `INTERFACE_LINK_LIBRARIES_DIRECT` and `LINK_ONLY`.
Defer actually using the information to later commits.

Issue: #22496
2022-03-22 11:57:48 -04:00
Brad King
1e49880472 cmGeneratorTarget: Avoid boolean trap in usage requirement lookup
Replace `bool usage_requirements_only` arguments with a proper
enumeration to clarify meaning at call sites.
2021-12-09 11:00:23 -05:00
Ben Boeckel
cdfc4e3195 clang-tidy: fix readability-qualified-auto warnings 2021-01-27 08:45:45 -05:00
Robert Maynard
7a969fe21d cmMakefile: Refactor API to better handle empty config values 2020-07-03 07:43:18 -04:00
Corentin Plouet
ee5eb2eab4 Graphviz: add missing support for circular dependencies
This support was actually added by removing a superfluous check that was
too eager in cmLinkItemGraphVisitor.cxx.

Extended the existing Graphviz tests to include this particular case,
and re-generated the expected output files.

Fixes: #20720
2020-06-22 01:17:19 +10:00
Kyle Edwards
7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
2020-02-17 08:24:57 -05: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