You need to have your own forks of the repositories in order to propose
modifications in the form of GitHub PRs. In some cases the modifications will
need to go in roottest
, so it's better to clone both. Go on the respective
websites:
And click on the Fork
button in the top right of the web UI.
You can now clone both repositories on your machine, e.g. via
$: git clone https://github.com/YOURUSERNAME/root.git
$: git clone https://github.com/YOURUSERNAME/roottest.git
To track changes in the main repositories, add the upstream
remotes.
Inside the root
directory:
$: git remote add upstream https://github.com/root-project/root.git
Inside the roottest
directory:
$: git remote add upstream https://github.com/root-project/roottest.git
To keep things clean, it is suggested to create separate directories for the builds and for the installations.
$: mkdir rootbuild rootinstall
There are many configuration options. For the purposes of development and testing, the following configuration is suggested:
$: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -Dtesting=ON -Droottest=ON -DCMAKE_INSTALL_PREFIX=rootinstall/myinstall -B rootbuild/mybuild -S root
The process of launching the Cmake build may be sped up by using the ccache package, if it is installed in the system. To activate it, add -Dccache=ON
to variables.
Finally, you can launch the CMake build via:
$: cmake --build rootbuild/mybuild --target install -jNPROC
Where NPROC
is the number of available cores you want to send in parallel for the build.