|
|
|
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
|
|
|
|
* Clone the repository somewhere on your PC using "git bash"
|
| ... | ... | @@ -18,7 +18,11 @@ cd .. |
|
|
|
```
|
|
|
|
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
|
|
|
|
```
|
| ... | ... | @@ -30,14 +34,13 @@ cd build |
|
|
|
```
|
|
|
|
cmake ..
|
|
|
|
```
|
|
|
|
* start the compilation (with 4 cores)
|
|
|
|
* start the compilation (with 4 parallel processes)
|
|
|
|
```
|
|
|
|
make -j 4
|
|
|
|
```
|
|
|
|
* run a program
|
|
|
|
* run a program:
|
|
|
|
```
|
|
|
|
gmsh -3 ..\srcs\mymesh.geo
|
|
|
|
bin\myview.exe ..\srcs\mymesh.msh
|
|
|
|
code1_loadgeo.exe ..\rectangle.geo
|
|
|
|
```
|
|
|
|
If a window does not show up, it means that you forgot to run `envs\windows.cmd`.
|
|
|
|
|
| ... | ... | @@ -61,6 +64,10 @@ cd .. |
|
|
|
* set the environment variables for cmake
|
|
|
|
```
|
|
|
|
source ./envs/linux-macos.sh
|
|
|
|
```
|
|
|
|
* go to the `examples/gmsh_api` folder:
|
|
|
|
```
|
|
|
|
cd examples/gmsh_api
|
|
|
|
```
|
|
|
|
* create a build folder and go into it
|
|
|
|
```
|
| ... | ... | @@ -71,14 +78,13 @@ cd build |
|
|
|
```
|
|
|
|
cmake ..
|
|
|
|
```
|
|
|
|
* build the project (with 4 cores)
|
|
|
|
* build the project (with 4 parallel processes)
|
|
|
|
```
|
|
|
|
make -j 4
|
|
|
|
```
|
|
|
|
* run a program
|
|
|
|
```
|
|
|
|
gmsh -3 ../srcs/mymesh.geo
|
|
|
|
bin/myview ../srcs/mymesh.msh
|
|
|
|
./code1_loadgeo ../rectangle.geo
|
|
|
|
```
|
|
|
|
|
|
|
|
# Note about the environment scripts
|
| ... | ... | |
| ... | ... | |