utils-lists 4.0.0
µOS++ C++ intrusive lists utilities
|
As a source code library, this project can be integrated into another project in the traditional way, by either copying the relevant files into the target project, or by linking the entire project as a Git submodule.
However, things can be further automated and the most convenient way is to add it as a dependency to the project via xpm.
Along with the source files, this project also includes a package.json
file with the metadata that allows it to be identified as an xpm/npm package so that it can be directly installed from GitHub or from the npmjs.com registry as @micro-os-plus/utils-lists
.
A recent xpm, which is a portable Node.js command line application that complements npm with several extra features specific to C/C++ projects.
It is recommended to install/update to the latest version with:
For details please follow the instructions in the xPack install page.
This project can be installed as a package from the npmjs.com
registry with:
After following the links, the result is a structure like this:
The package can also be installed with npm or related, but the features specific to C/C++ projects will not be available; therefore, at least for consistency reasons, it is recommended to use xpm.
Besides manually copying the relevant files to the target project, which will later require extra maintenance efforts to keep the project up to date, a more convenient solution is to link the entire project as a Git submodule, for example below an xpacks
folder:
The project uses Git and is hosted on GitHub as https://github.com/micro-os-plus/utils-lists-xpack.git.
Apart from the unused master
branch, there are two active branches:
xpack
, with the latest stable version (default)xpack-develop
, with the current development versionAll development is done in the xpack-develop
branch, and contributions via Pull Requests should be directed to this branch.
When new releases are published, the xpack-develop
branch is merged into the xpack
branch.
The project is written in C++, and it is expected to be used in C++ projects.
The source code was compiled natively with GCC and LLVM/clang and cross compiled on embedded Arm and RISC-V targets, and is expected to be warnings free.
To ease the integration of this library into user projects, there are already made CMake and meson configuration files (see below).
For other build systems, consider the following details:
The following folders should be passed to the compiler during the build:
include
The header files to be included in user projects are:
The source files to be added to user projects are:
There are several preprocessor definitions used to configure the build:
MICRO_OS_PLUS_INCLUDE_CONFIG_H
- to include <micro-os-plus/config.h>
MICRO_OS_PLUS_TRACE_UTILS_LISTS
- to trace some calls, like clear()
, insert()
, link()
, unlink()
MICRO_OS_PLUS_TRACE_UTILS_LISTS_CONSTRUCT
- to trace constructors and destructorsThe following options must be passed to the compiler and linker:
-std=c++20
or higher for C++ sourcesThe library has the following dependencies:
@micro-os-plus/diag-trace
- the µOS++ trace::printf()
tracing infrastructure (optional, used only if MICRO_OS_PLUS_TRACE_UTILS_LISTS*
are defined)To integrate the utils-lists library into a CMake application, add the folder where this project is located to the build:
The result is an interface library that can be added as an application dependency with:
To integrate the utils-lists library into a meson application, add the folder where this project is located to the build:
The result is a dependency object that can be added to an application with: