From 4e046442fd467814aa394b089ed5cd7209a95cb9 Mon Sep 17 00:00:00 2001
From: Vladimir Onoprienko <vonopr@yandex.ru>
Date: Tue, 19 Apr 2022 14:40:52 +0000
Subject: [PATCH] Update README.md

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

diff --git a/README.md b/README.md
index cc41acd..3354375 100644
--- a/README.md
+++ b/README.md
@@ -127,3 +127,21 @@ Intel C++ Compiler should be used with `NMake Makefiles`, MinGW C++ should be us
 ```
 cmake -B . -S ../exple-cmake-build -G"Visual Studio 17 2022"
 ```
+
+### Choosing a compiler and setting compiler options
+
+To choose a compiler use *CMAKE_CXX_COMPILER* variable when configuring cmake build. For setting options to be passed to compiler during build use *CMAKE_CXX_FLAGS* variable.
+
+If you have *icc* on path, i.e.
+```
+icc --version
+```
+returns the version number then you can select it as a compiler for building this project with
+```
+cmake -B . -S ../exple-cmake-build -DCMAKE_CXX_COMPILER=icc
+```
+To specify compilation options, e.g. *-fno-align-loops* and *-fno-align-loops*
+```
+cmake -B . -S ../exple-cmake-build -DCMAKE_CXX_COMPILER=icc -DCMAKE_CXX_FLAGS="-fno-align-loops -fno-align-loops"
+```
+
-- 
GitLab