Skip to content

Commit

Permalink
[doc] Add advice for developers (#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes authored Sep 20, 2023
1 parent 967433f commit 2d5b705
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 deletions.
10 changes: 1 addition & 9 deletions docs/build/0-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,4 @@ This software suite has been tested under:
- [Build](3-Build.md)
- [Tests](4-Tests.md)
- [Installer creation](5-Installer-creation.md)

[ubuntu_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(pre-compiled)/badge.svg
[ubuntu_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(pre-compiled)"

[windows_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG%20and%20pre-compiled)/badge.svg
[windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)"

[centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg
[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)"
- [Developer advice](6-dev-advice.md)
39 changes: 39 additions & 0 deletions docs/build/6-dev-advice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Developer advice

## Ignore submodules to make git operations faster
Antares_Simulator is quite a large project, with a few large submodules. In file .git/config, you can add this line to all [submodule] sections

```
ignore = all
```

This way git won't waste time computing diff on these when checking out, diffing commits, etc. git operations should be a lot faster. Keep in mind that your submodules won't be updated.

## Disable the UI build to make builds faster
The UI takes up a good chunk of compilation time. It is enabled by default, byt you can disable it by providing CMake with this option at configure time

```
cmake -S src [...] -DBUILD_UI=OFF
```

## Use Ninja to speed up target generation by CMake
At configure time, you may specify Ninja for generation instead of traditional Make. This will speed up the update step after you made small changes to the code.

```
cmake -S src [...] -G Ninja
```

Note that you may need to install Ninja first (package `ninja-build` on Ubuntu).

## Adding the solver build path to your PATH
If you use `antares-x.y-solver` often, you may find it convenient to add it's location to your PATH. In your .bashrc, add (with slight variations)

```
export PATH="$PATH:path/to/Antares_Simulator/build/solver
```

Then you can open a terminal and execute antares-x.y-solver by just typing

```
antares-x.y-solver
```

0 comments on commit 2d5b705

Please sign in to comment.