From 2d5b7054f5cdf568f86eca73f899f84e3b4ae047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Wed, 20 Sep 2023 11:06:29 +0200 Subject: [PATCH] [doc] Add advice for developers (#1639) --- docs/build/0-INSTALL.md | 10 +--------- docs/build/6-dev-advice.md | 39 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 docs/build/6-dev-advice.md diff --git a/docs/build/0-INSTALL.md b/docs/build/0-INSTALL.md index 11c67ac123..2be78c7552 100644 --- a/docs/build/0-INSTALL.md +++ b/docs/build/0-INSTALL.md @@ -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) diff --git a/docs/build/6-dev-advice.md b/docs/build/6-dev-advice.md new file mode 100644 index 0000000000..7b23e718e4 --- /dev/null +++ b/docs/build/6-dev-advice.md @@ -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 +```