diff --git a/CMakeLists.txt b/CMakeLists.txt index 81051690488af14b1d9aa46d17a7ec2e80f47493..6d237087c3a157433f353aa1b657b6055296735f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,24 @@ endif() include(FetchContent) + +# Define the PathTOJson variable with an empty default value +set(NLOHMAN_JSON_PATH "" CACHE STRING "Path to the local nlohmann json release file") + +if(NLOHMAN_JSON_PATH) + FetchContent_Declare( + json + URL ${NLOHMAN_JSON_PATH} + ) +else() + FetchContent_Declare( + json + URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz + ) +endif() + +# FetchContent configuration + FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) FetchContent_MakeAvailable(json) diff --git a/README.md b/README.md index 7d112307c254f0d6012bca5aed9f882c921e1d42..120ed2425d190484cef2cb48af0a340e5ef21945 100644 --- a/README.md +++ b/README.md @@ -7,50 +7,4 @@ which translates roughly into: "Una altra capa al pastís" or "Yet another layer Its main use case is to provide an interface to annotate code regions. These annotated regions then can be used with multiple backends to gain insight in application behavior. -## Bindings - -To make neSmiK easily usable, we provide Fortran, C, C++ bindings to the library. - -### CXX bindings - -```cpp -#include "nesmik/nesmik.hpp" - -int main() { - nesmik::Init("ProperlyNested","Default"); // inits the nesmik library - nesmik::RegionStart("peter"); - - nesmik::RegionStart("marie"); - - nesmik::RegionStop("marie"); - - nesmik::RegionStop("peter"); - nesmik::Finalize(); -} -``` - -### Fortran - -To enable the Fortran module to be built please add `-DBUILD_C_FORTRAN=ON` to the cmake flags. - -```fortran -program test - use nesmik_mod - call Init("ProperlyNested","Default") - call RegionStart("test") - call RegionStop("test") - call Finalize() - end program test -``` - -Please consider having a look into the documentation (which will be available soon) for further details. - -## Backends - -| Nesting | Backend | Description | -|-------------------|-------------------|----------------------------------------------------------------| -| ProperlyNested | Default | Default Backend, just prints the regions | -| NotProperlyNested | Default | Default Backend, just prints the regions | -| ProperlyNested | Extrae::TypeStack | Extrae backend using different Types for the levels of nesting | -| ProperlyNested | TALP::Tree | DLB-TALP backend printing a tree to visualize the nesting | -| NotProperlyNested | TALP | DLB-TALP backend to register the monitoring regions | +In order to use it [please check out our documentation](https://nesmik.readthedocs.io/en/latest/) diff --git a/docs/source/install.rst b/docs/source/install.rst index dc8979b044144233098250d7bb4f1bfa91091d54..a137620fad502e18b421a83e7d31784ad1998c21 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -15,7 +15,6 @@ Requirements * The source files of nesmik e.g downloaded via a `git clone` or a release `.tar.gz` file. * CMake >= 3.27 * C++ 17 compatible compiler -* Internet connection during install (to fetch nlohmann_json automagically) Optional dependencies ====================== @@ -64,6 +63,10 @@ We try to keep the documentation up-to-date, but newer versions may contain more * - WITH_MPI - OFF - Enables MPI-awareness (If you wanna use neSmiK in an MPI program, please enable) + * - NLOHMAN_JSON_PATH + - "" + - Path to a previously downloaded `tar.xz` file. + @@ -77,5 +80,8 @@ Installation steps * by default cmake will generate a ``Makefile``, so as a next step run ``make && make install`` * In order to run the small test suite you can invoke ``ctest`` in the build folder. +.. note:: + If you want to install neSmiK on a cluster without internet access, please download a version of `nlohmann json `_ and configure with: + ``-DNLOHMAN_JSON_PATH=.tar.xz`` **Congrats!** Now you can move forward to TODO: integrate neSmiK into your `projects build system` and `start annotation code`