From 9f9b0fb52a042b53679e64a8dd7af45b87b1967b Mon Sep 17 00:00:00 2001
From: Lizzzka007 <gashchuk2011@mail.ru>
Date: Sun, 22 Sep 2024 16:58:07 +0300
Subject: [PATCH] Add Cmake instructions

---
 README.md | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/README.md b/README.md
index ae3d0d2..1a25762 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,34 @@ Option `COMPILER` enables set of compiler-specific options. Most common are `gnu
 ./sfx.exe
 ```
 
+## Building with CMake
+
+Currently there is an implementation of Cmake-based toolchain which allows to build the model quicker and with less hustle (minimum required cmake version is 3.19). Clone the project and load appropriate modules. Create a build directory outside of cloned projects:
+
+```bash
+mkdir build && cd build
+```
+
+The code supports fluxes computations on both CPU and GPU and the CPU implementation has two versions: Fortran and C++ implementation. 
+
+1. Building the Fortran CPU version:
+```bash
+cmake ..
+```
+
+2. Building the C++ CPU version:
+```bash
+cmake -DUSE_CXX=ON ..
+```
+
+3. Building the C++ GPU version:
+```bash
+cmake -DINCLUDE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=<N> ..
+```
+where `N` is the architecture to generate device code for.
+
+
+
 ## Running test cases
 We have prepared several dataseta to make the test calculations. Data is prepared on the basis of measurements.
 
-- 
GitLab