summaryrefslogtreecommitdiffstats
path: root/Source/cmGraphVizWriter.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source: Avoid comparing pointers to nullptrVitaly Stakhovsky2024-08-271-2/+2
|
* cmGraphVizWriter: ignore `__cmake_`-prefixed targetsBen Boeckel2024-04-121-1/+2
| | | | | These targets are internal to CMake's C++ `import std` implementation and should not appear.
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-3/+3
|
* clang-tidy: address `modernize-use-default-member-init` lintsBen Boeckel2022-05-241-12/+0
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-3/+3
|
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-2/+2
|
* clang-tidy: fix `bugprone-reserved-identifier` warningsBen Boeckel2021-01-271-17/+17
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-14/+18
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-4/+5
|
* Graphviz: Fix bug that shows duplicated alias targetsStephan Rohmen2020-08-171-3/+11
| | | | When using subdirectories the alias targets were duplicated
* Graphviz: Fix issue with too many open file streams on Windows platformStephan Rohmen2020-07-311-26/+11
| | | | Fixes #20931
* Avoid duplicate calls to GetDefinitionVitaly Stakhovsky2020-07-281-1/+1
|
* Merge branch 'backport-3.17-graphviz-restore-per-target'Brad King2020-07-211-6/+110
|\
| * Graphviz: Restore support for per-target dependency graph optionsStephan Rohmen2020-07-211-6/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | The behaviors controlled by options `GRAPHVIZ_GENERATE_PER_TARGET` and `GRAPHVIZ_GENERATE_DEPENDERS` were broken by commit 553658393c (Graphviz: added test suite, fixes, enhancements, 2019-10-08, v3.17.0-rc1~615^2). It had not been covered in the test suite previously, and those changes left out checks for these features from the `default_options` case. Implement the previously-existing behavior in the new graphviz generation engine added by the above-mentioned commit. Fixes: #20928
* | Merge topic 'cleanup-endls-3'Brad King2020-03-261-55/+47
|\ \ | | | | | | | | | | | | | | | | | | 8e3a65d963 Refactor: Avoid `std::endl` where it's not necessary (part 3) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4517
| * | Refactor: Avoid `std::endl` where it's not necessary (part 3)Alex Turbov2020-03-241-55/+47
| |/ | | | | | | | | | | | | | | | | | | | | | | The `std::endl` manipulator, except inserting `\n` character, also performs `os.flush()`, which may lead to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning. * replace multiple `operator<<` calls on a string literal w/ the only call and the only (bigger) string literal; * replace one character string literal used in `operator<<` w/ a char literal.
* | replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-3/+3
|/
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-1/+1
| | | | Fixes: #20345
* cmLocalGenerator: modernize memory managementMarc Chevrier2019-12-091-1/+1
|
* cmLocalGenerator: modernize memory managementMarc Chevrier2019-11-111-2/+2
|
* Graphviz: added test suite, fixes, enhancementsCorentin Plouet2019-10-081-400/+323
| | | | | | | | | | | | | | | | | | | | * 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
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-12/+6
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+2
| | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-1/+2
|
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-2/+2
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Source: change parameters to std::stringVitaly Stakhovsky2019-05-191-13/+13
|
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+2
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Fix most clang -Wextra-semi-stmt warnings in C++ filesSean McBride2019-01-151-4/+4
| | | | Suppress one in code generated by flex.
* graphviz: dereference ALIAS targetsNick Schultz2018-10-261-6/+27
| | | | | | | Previous behavior treats ALIAS targets as external targets. This fix de-aliases these targets to their pointed target. Fixes: #15636
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-2/+2
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-2/+2
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* cmGraphVizWriter: Updated to create and follow dependers for interface targetsJoel T. Frederico2017-12-141-15/+26
| | | | | Generating graphs of dependencies now uses interface targets, but graphs of dependers did not include interface targets.
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-7/+7
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* graphviz: distinguish target dependency typesNico Müller2017-09-211-5/+98
| | | | | | - The output graph of graphviz differs now between target link types - Updated documentation - Fixes: #17192
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-69/+40
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-7/+7
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-2/+4
| | | | | | | | | | | Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-5/+6
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-9/+9
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* surround macro arguments with parenthesesDaniel Pfeifer2016-09-051-2/+2
|
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+10
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-3/+2
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-7/+7
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-2/+2
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'