====== Installation guide ======
This page is dedicated to the uttilisation of CMake.
===== 1 Installing CMake =====
* __Windows__: \\ Download and install CMake for windows : [[https://cmake.org/download/]] \\ You need to install the Windows x64 Installer .msi
{{ :devs:installation_cmake.jpg?nolink |}}
Before doing something else, you need to be sure that the Intel Fortran compiler is already installed (see [[devs:install|Installation guide]] in 2.2 Intel Fortran compile).
The default path of the compiler is : "C:/Program Files (x86)/Intel/oneAPI/mkl/2021.2.0/lib/intel64". If yours is different, you need to adapt it in the main CMakeLists.txt file. It exists a main for every project (Prepro, Lagamine and Select) and one for the whole project (the main one).
===== 2 Using CMake =====
The idea of CMake is to develop a file (CMakeLists.txt) that build up a .sln file (it is the Lagamine Visual Studio project), it allows to compile Lagamine on any calculating machine easily, without having to define compiler parameters.
To produce the Lagamine Visual Studio project, open CMake(cmake-gui): {{ :devs:cmake_icone.jpg?nolink|}}
{{ :devs:cmake1.jpg?nolink |}}
A new window will appear (see ), you need to fill the two fields :
- "Where is the source code:" you need to choose the folder that contains files that comes from gitlab.
- "Where to build the binaries:" you need to choose the folder that will contain the VS project.
Then, you need to press on Configure, a new window will appear (see ):
- Use the right version of Visual Studio in " Specify the generator for this project".
- Impose the use of x64 (if this step is not done error in compilation, see [[devs:install|Installation guide]] in 2.4.1).
- Then press on "Finish".
{{ :devs:cmake2_configure.jpg?nolink |}}
The window will receive some results (see )
{{ :devs:cmake3_results.jpg?nolink |}}
Then press on "generate" and the VS project will be created and it will be ready to compile.