change folder paths authored by Boman Romain's avatar Boman Romain
This page explains how to build the code. You must have checked that [git](Git), [a C++ compiler](MinGW) and [cmake](CMake) are correctly installed on your system. This page explains how to build the examples. You must have checked that [git](Git), [a C++ compiler](MinGW) and [cmake](CMake) are correctly installed on your system.
## Windows ## Windows
* Clone the repository somewhere on your PC using "git bash" * Clone the repository somewhere on your PC using "git bash"
...@@ -18,7 +18,11 @@ cd .. ...@@ -18,7 +18,11 @@ cd ..
``` ```
envs\windows.cmd envs\windows.cmd
``` ```
* Then, in the same terminal, create a build folder: * Then, in the same terminal, go to an example folder:
```
cd examples\gmsh_api
```
* Create a build folder in `examples\gmsh_api`:
``` ```
mkdir build mkdir build
``` ```
...@@ -30,14 +34,13 @@ cd build ...@@ -30,14 +34,13 @@ cd build
``` ```
cmake .. cmake ..
``` ```
* start the compilation (with 4 cores) * start the compilation (with 4 parallel processes)
``` ```
make -j 4 make -j 4
``` ```
* run a program * run a program:
``` ```
gmsh -3 ..\srcs\mymesh.geo code1_loadgeo.exe ..\rectangle.geo
bin\myview.exe ..\srcs\mymesh.msh
``` ```
If a window does not show up, it means that you forgot to run `envs\windows.cmd`. If a window does not show up, it means that you forgot to run `envs\windows.cmd`.
...@@ -61,6 +64,10 @@ cd .. ...@@ -61,6 +64,10 @@ cd ..
* set the environment variables for cmake * set the environment variables for cmake
``` ```
source ./envs/linux-macos.sh source ./envs/linux-macos.sh
```
* go to the `examples/gmsh_api` folder:
```
cd examples/gmsh_api
``` ```
* create a build folder and go into it * create a build folder and go into it
``` ```
...@@ -71,14 +78,13 @@ cd build ...@@ -71,14 +78,13 @@ cd build
``` ```
cmake .. cmake ..
``` ```
* build the project (with 4 cores) * build the project (with 4 parallel processes)
``` ```
make -j 4 make -j 4
``` ```
* run a program * run a program
``` ```
gmsh -3 ../srcs/mymesh.geo ./code1_loadgeo ../rectangle.geo
bin/myview ../srcs/mymesh.msh
``` ```
# Note about the environment scripts # Note about the environment scripts
... ...
......