Diagnosticism is a classic-form C/C++ library, insofar as it has implementation files in its src directory and header files in its include/diagnosticism directory. Thus, once "installed", one must simply include diagnosticism/XXXX.h (where XXXX might be doomgram, or ev, or another of the API headers).
You may elect to compile in the src file(s) needed, but the standard way to do so is to build and install the library via CMake as described below.
NOTE: Diagnosticism::core has no install-time package dependencies. STLSoft, xTests, and optional shwild are required only when building automated tests (
BUILD_TESTING=ON). Use./prepare_cmake.sh --disable-testing(or-DBUILD_TESTING=OFF) for a library-only configure/build/install.
You can obtain a .zip or .tar.gz at the Releases page, e.g.:
$ mkdir -p ~/open-source
$ cd ~/open-source
$ curl -L -O https://github.com/synesissoftware/Diagnosticism/archive/refs/tags/0.2.0-beta4.tar.gz
$ gunzip 0.2.0-beta4.tar.gz
$ cd Diagnosticism-0.2.0-beta4Or you may prefer to clone the project via git
$ mkdir -p ~/open-source
$ cd ~/open-source
$ git clone https://github.com/synesissoftware/Diagnosticism/
$ cd DiagnosticismPrepare the CMake configuration, via the prepare_cmake.sh script, as in:
./prepare_cmake.shBy default, this will create a _build directory under the project directory. If you want to use a specific directory you can do so via the environment variable SIS_CMAKE_BUILD_DIR.
$ export SIS_CMAKE_BUILD_DIR=/tmp/Diagnosticism
$ ./prepare_cmake.shNOTE: If you provide the flag
--run-make(===-m) then the script will also run a build, so the Build step can be skipped.
export SIS_CMAKE_BUILD_DIR=/tmp/Diagnosticism
./prepare_cmake.sh --msvc-mt./build_cmake.shNOTE: If you provide the flag
--run-make(===-m) in step 3 then you do not need this step.
- As a check, execute the built test program files via the build_run_all_unit_tests.sh script, as in:
./run_all_unit_tests.sh -MNOTE: If you do not provide the flag
--no-make(===-M) then the script will also run a build.
- Install the library on the host, via
cmake, as in:
sudo cmake --install ${SIS_CMAKE_BUILD_DIR:-./_build} --config Release- Consume from another CMake project (no STLSoft / xTests required):
find_package(Diagnosticism REQUIRED)
target_link_libraries(myapp PRIVATE Diagnosticism::core)