Fix typos, fix some warnings, added more compile options, moved to forgejo CI
Some checks failed
Main LMDBAL workflow / Test LMDBAL with qt5 (push) Has been cancelled
Main LMDBAL workflow / Test LMDBAL with qt6 (push) Has been cancelled
Main LMDBAL workflow / Release documentation (push) Has been cancelled

This commit is contained in:
Blue 2025-05-02 18:19:06 +03:00
parent 3ae1fd15c0
commit 1585b8e4f5
Signed by: blue
GPG key ID: 9B203B252A63EE38
15 changed files with 204 additions and 120 deletions

View file

@ -19,7 +19,8 @@
#### As a system library
If you're using LMDBAL as a system library you probably have no control over it's build options. The easiest way to include the project is to add following
If you're using LMDBAL as a system library, you probably have no control over its build options.
The easiest way to include the project is to add the following
```
find_package(lmdbal)
@ -29,14 +30,14 @@ if (LMDBAL_FOUND)
endif()
```
#### As an embeded subproject
#### As an embedded subproject
If you're using LMDBAL as a embeded library you might want to control it's build options, for example you can run
If you're using LMDBAL as a embedded library, you might want to control its build options, for example, you can run
```
set(BUILD_STATIC ON)
set(LMDBAL_BUILD_STATIC ON)
```
before including the library in your project. This will set the library to be build in a static mode.
... before including the library in your project. This will set the library to be build in a static mode.
Then you want to run something like this
```
@ -67,9 +68,11 @@ $ cmake --build .
$ cmake --install . --prefix install
```
This way will create you a `lmdbal/build` directory with temporary files, and `lmdbal/build/install` with all the export files for installation to the system.
This way will create you a `lmdbal/build` directory with temporary files, and `lmdbal/build/install`
with all the export files for installation to the system.
After `cmake ..` you can specify keys to alter the building process. In this context building keys are transfered like so
After `cmake ..` you can specify keys to alter the building process.
In this context building keys are transferred like so
```
cmake .. -D KEY1=VALUE1 -D KEY2=VALUE2 ...
@ -80,22 +83,26 @@ cmake .. -D KEY1=VALUE1 -D KEY2=VALUE2 ...
Here is the list of keys you can pass to configuration phase of `cmake ..`:
- `CMAKE_BUILD_TYPE` - `Debug` just builds showing all warnings, `Release` builds with no warnings and applies optimizations (default is `Debug`);
- `BUILD_STATIC` - `True` builds project as a static library, `False` builds as dynamic (default is `False`);
- `BUILD_TESTS` - `True` build unit tests, `False` does not (default is `False`);
- `LMDBAL_BUILD_STATIC` - `True` builds project as a static library, `False` builds as dynamic (default is `False`);
- `LMDBAL_BUILD_TESTS` - `True` build unit tests, `False` does not (default is `False`);
- `BUILD_DOC` - `True` build doxygen documentation, `False` does not (default is `False`);
- `BUILD_DOXYGEN_AWESOME` - `True` build doxygen awesome theme if `BUILD_DOC` is also `True` (default is `False`);
- `QT_VERSION_MAJOR` - `5` links against Qt5, `6` links agains Qt6, there is no default, so, if you didn't specify it the project will chose automatically;
- `LMDBAL_NAME` - `LMDBAL` builds main target with this name, also install path witll be this name lowercase, usefull if you want to build `LMDBAL-QT6` not to conflict with `LMDBAL-QT5`;
- `LMDBAL_BUILD_DOXYGEN_AWESOME` - `True` build doxygen awesome theme if `BUILD_DOC` is also `True` (default is `False`);
- `QT_VERSION_MAJOR` - `5` links against Qt5, `6` links against Qt6, there is no default, so, if you didn't specify it, the project will choose automatically;
- `LMDBAL_NAME` - `LMDBAL` builds the main target with this name, also the installation path will be this name lowercase, useful if you want to build `LMDBAL-QT6` not to conflict with `LMDBAL-QT5`;
- `LMDBAL_STRICT` - `True` builds with extra warnings and considers them errors (default is `False`);
- `LMDBAL_ASAN` - `True` builds with address sanitizer (default is `False`);
- `LMDBAL_TSAN` - `True` builds with thread sanitizer (default is `False`);
- `LMDBAL_UBSAN` - `True` builds with undefined behavior sanitizer (default is `False`);
#### Running tests
If you built the library with `-D BUILD_TESTS=True`, then there will be `lmdbal/build/tests/runUnitTests` executable file. You can simply run it as
If you built the library with `-D LMDBAL_BUILD_TESTS=True`, then there will be `lmdbal/build/tests/runUnitTests` executable file. You can run it as
```
./runUnitTests
```
if you're in the same directory with it
... if you're in the same directory with it
## License