diff --git a/README.md b/README.md index 8d8b03b91e..48dec1eb83 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ Shipped internally in `share/openPMD/thirdParty/`: * [Catch2](https://github.com/catchorg/Catch2) 2.6.1+ ([BSL-1.0](https://github.com/catchorg/Catch2/blob/master/LICENSE.txt)) * [pybind11](https://github.com/pybind/pybind11) 2.2.4+ ([new BSD](https://github.com/pybind/pybind11/blob/master/LICENSE)) * [NLohmann-JSON](https://github.com/nlohmann/json) 3.5.0+ ([MIT](https://github.com/nlohmann/json/blob/develop/LICENSE.MIT)) +* [spdlog](https://github.com/gabime/spdlog) 1.3.1+ ([MIT](https://github.com/gabime/spdlog/blob/master/LICENSE)) Optional I/O backends: * [JSON](https://en.wikipedia.org/wiki/JSON) @@ -194,7 +195,8 @@ CMake controls options with prefixed `-D`, e.g. `-DopenPMD_USE_MPI=OFF`: | `openPMD_USE_HDF5` | **AUTO**/ON/OFF | HDF5 backend (`.h5` files) | | `openPMD_USE_ADIOS1` | **AUTO**/ON/OFF | ADIOS1 backend (`.bp` files) | | `openPMD_USE_ADIOS2` | AUTO/ON/**OFF** | ADIOS2 backend (`.bp` files) 1 | -| `openPMD_USE_PYTHON` | **AUTO**/ON/OFF | Enable Python bindings | +| `openPMD_USE_PYTHON` | **AUTO**/ON/OFF | Python bindings | +| `openPMD_USE_LOGGING` | **AUTO**/ON/OFF | Multi-level, multi-target log mechanism | | `openPMD_USE_INVASIVE_TESTS` | ON/**OFF** | Enable unit tests that modify source code 2 | | `openPMD_USE_VERIFY` | **ON**/OFF | Enable internal VERIFY (assert) macro independent of build type 3 | | `PYTHON_EXECUTABLE` | (first found) | Path to Python executable | @@ -212,6 +214,7 @@ The following options allow to switch to external installs: | `openPMD_USE_INTERNAL_CATCH` | **ON**/OFF | Catch2 | 2.6.1+ | | `openPMD_USE_INTERNAL_PYBIND11` | **ON**/OFF | pybind11 | 2.2.4+ | | `openPMD_USE_INTERNAL_JSON` | **ON**/OFF | NLohmann-JSON | 3.5.0+ | +| `openPMD_USE_INTERNAL_SPDLOG` | **ON**/OFF | spdlog | 1.3.1+ | By default, this will build as a static library (`libopenPMD.a`) and installs also its headers. In order to build a shared library, append `-DBUILD_SHARED_LIBS=ON` to the `cmake` command. @@ -223,6 +226,9 @@ In order to build with debug symbols, pass `-DCMAKE_BUILD_TYPE=Debug` to your `c By default, tests and examples are built. In order to skip building those, pass `-DBUILD_TESTING=OFF` or `-DBUILD_EXAMPLES` to your `cmake` command. +By default, logging is only enabled in `Debug` builds. +In order to enable this feature unconditionally, pass `-DopenPMD_USE_LOGGING=ON` or `-DopenPMD_USE_LOGGING=OFF` to disable it. + ## Linking to your project The install will contain header files and libraries in the path set with `-DCMAKE_INSTALL_PREFIX`. diff --git a/docs/source/dev/buildoptions.rst b/docs/source/dev/buildoptions.rst index 2b798885e5..23788d135a 100644 --- a/docs/source/dev/buildoptions.rst +++ b/docs/source/dev/buildoptions.rst @@ -19,7 +19,8 @@ CMake Option Values Description ``openPMD_USE_HDF5`` **AUTO**/ON/OFF HDF5 backend (``.h5`` files) ``openPMD_USE_ADIOS1`` **AUTO**/ON/OFF ADIOS1 backend (``.bp`` files) ``openPMD_USE_ADIOS2`` AUTO/ON/**OFF** ADIOS2 backend (``.bp`` files) :sup:`1` -``openPMD_USE_PYTHON`` **AUTO**/ON/OFF Enable Python bindings +``openPMD_USE_PYTHON`` **AUTO**/ON/OFF Python bindings +``openPMD_USE_LOGGING`` **AUTO**/ON/OFF Multi-level, multi-target log mechanism ``openPMD_USE_INVASIVE_TESTS`` ON/**OFF** Enable unit tests that modify source code :sup:`2` ``openPMD_USE_VERIFY`` **ON**/OFF Enable internal VERIFY (assert) macro independent of build type :sup:`3` ``PYTHON_EXECUTABLE`` (first found) Path to Python executable @@ -75,6 +76,7 @@ CMake Option Values Installs Library Version ``openPMD_USE_INTERNAL_CATCH`` **ON**/OFF No Catch2 2.6.1+ ``openPMD_USE_INTERNAL_PYBIND11`` **ON**/OFF No pybind11 2.2.4+ ``openPMD_USE_INTERNAL_JSON`` **ON**/OFF No NLohmann-JSON 3.5.0+ +``openPMD_USE_INTERNAL_SPDLOG`` **ON**/OFF No spdlog 1.3.1+ ================================= =========== ======== ============= ======== @@ -83,3 +85,10 @@ Tests By default, tests and examples are built. In order to skip building those, pass ``-DBUILD_TESTING=OFF`` or ``-DBUILD_EXAMPLES=OFF`` to your ``cmake`` command. + + +Logging +------- + +By default, logging is only enabled in ``Debug`` builds. +In order to enable this feature unconditionally, pass ``-DopenPMD_USE_LOGGING=ON`` or ``-DopenPMD_USE_LOGGING=OFF`` to disable it unconditinoally. diff --git a/docs/source/dev/dependencies.rst b/docs/source/dev/dependencies.rst index b0ba74182c..91b14f6ac3 100644 --- a/docs/source/dev/dependencies.rst +++ b/docs/source/dev/dependencies.rst @@ -23,6 +23,7 @@ The following libraries are shipped internally in ``share/openPMD/thirdParty/`` * `Catch2 `_ 2.6.1+ (`BSL-1.0 `_) * `pybind11 `_ 2.2.4+ (`new BSD `_) * `NLohmann-JSON `_ 3.5.0+ (`MIT `_) +* `spdlog `_ 1.3.1+ (`MIT `_) Optional: I/O backends ----------------------