Added documentation about clang-uml-wrapped script for Nix

This commit is contained in:
Bartek Kryza
2024-05-30 21:22:59 +02:00
parent a9e99c9787
commit 9ad5336d83
3 changed files with 13 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
* [Use '--query-driver' command line option](#use---query-driver-command-line-option)
* [Manually add and remove compile flags from the compilation database](#manually-add-and-remove-compile-flags-from-the-compilation-database)
* [Using 'CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES'](#using-cmake_cxx_implicit_include_directories)
* [Nix wrapper](#nix-wrapper)
<!-- tocstop -->
@@ -224,4 +225,12 @@ Yet another option, for CMake based projects, is to use the following CMake opti
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
```
### Nix wrapper
On NixOS or when using `nix`, `clang-uml` provides a wrapper script called
`clang-uml-wrapped`, which builds and exports `CPATH` and `CPLUS_INCLUDE_PATH`
environment variables before running `clang-uml`, which contain valid
system header Clang paths for the current Nix environment.
The `clang-uml-wrapped` script can be called the same way as `clang-uml` and
should resolve the system include paths without the need for any of the above
solutions.

View File

@@ -11,8 +11,8 @@
* [Cannot generate diagrams from header-only projects](#cannot-generate-diagrams-from-header-only-projects)
* [YAML anchors and aliases are not fully supported](#yaml-anchors-and-aliases-are-not-fully-supported)
* [Schema validation error is thrown, but the configuration file is correct](#schema-validation-error-is-thrown-but-the-configuration-file-is-correct)
* [Class diagrams](#class-diagrams)
* ["fatal error: 'stddef.h' file not found"](#fatal-error-stddefh-file-not-found)
* [Class diagrams](#class-diagrams)
* [How can I generate class diagram of my entire project](#how-can-i-generate-class-diagram-of-my-entire-project)
* [Cannot generate classes for 'std' namespace](#cannot-generate-classes-for-std-namespace)
* [Sequence diagrams](#sequence-diagrams)
@@ -224,8 +224,6 @@ schema validation, and exits if the configuration file is invalid.
In case there is a bug in the schema validation, the schema validation
step can be skipped by providing `--no-validate` command line option.
## Class diagrams
### "fatal error: 'stddef.h' file not found"
This error means that Clang cannot find some standard headers in include
@@ -285,6 +283,8 @@ clang-uml --add-compile-flag -I/opt/my_toolchain/include \
Also see
[here](./md_docs_2common__options.html#resolving-include-path-and-compiler-flags-issues).
## Class diagrams
### How can I generate class diagram of my entire project
I want to generate a diagram containing all classes and relationships in my