Skip to content

Commit

Permalink
Add formatting information to the README file.
Browse files Browse the repository at this point in the history
  • Loading branch information
breyerml committed Nov 12, 2024
1 parent 042d739 commit 8e8500c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ General dependencies:
- [doxygen](https://www.doxygen.nl/index.html) if documentation generation is enabled
- [Pybind11 ≥ v2.13.3](https://github.com/pybind/pybind11) if Python bindings are enabled
- [OpenMP](https://www.openmp.org/) 4.0 or newer (optional) to speed-up library utilities (like file parsing)
- [Format.cmake](https://github.com/TheLartians/Format.cmake) if auto formatting via clang-format is enabled; also requires at least clang-format-18 and git
- multiple Python modules used in the utility scripts, to install all modules use `pip install --user -r install/python_requirements.txt`

Additional dependencies for the OpenMP backend:
Expand Down Expand Up @@ -276,6 +277,7 @@ The `[optional_options]` can be one or multiple of:
- `PLSSVM_ENABLE_TESTING=ON|OFF` (default: `ON`): enable testing using GoogleTest and ctest
- `PLSSVM_ENABLE_LANGUAGE_BINDINGS=ON|OFF` (default: `OFF`): enable language bindings
- `PLSSVM_STL_DEBUG_MODE_FLAGS=ON|OFF` (default: `OFF`): enable STL debug modes (**note**: changes the resulting library's ABI!)
- `PLSSVM_ENABLE_FORMATTING=ON|OFF` (default: `OFF`): enable automatic formatting using clang-format; adds additional targets `check-clang-format`, `clang-format`, and `fix-clang-format`

If `PLSSVM_ENABLE_TESTING` is set to `ON`, the following option can also be set:

Expand Down Expand Up @@ -432,6 +434,23 @@ cmake --build . -- coverage

The resulting `html` coverage report is located in the `coverage` folder in the build directory.

### Automatic Source File Formatting

To enable automatic formatting `PLSSVM_ENABLE_FORMATTING` must be set to `ON` and a `clang-format` and `git` executables must be available in `PATH` (minimum `clang-format` version is 18).

To check whether formatting changes must be applied use:

```bash
cmake --build . --target check-clang-format
```

To auto format all files use:

```bash
cmake --build . --target clang-format
cmake --build . --target fix-clang-format
```

### Creating the Documentation

If doxygen is installed and `PLSSVM_ENABLE_DOCUMENTATION` is set to `ON` the documentation can be build using
Expand Down

0 comments on commit 8e8500c

Please sign in to comment.