I’ve noticed that the latest build instructions have you create a build directory at the same level as the top-level root directory when cloning from the GitHub repository. When building 6.24 from the tar file, I have been creating the build directory as a sub-directory of the top-level root directory. In addition, I notice that the clone comes with a build directory already there. Not sure what purpose it serves.
Is there somewhere I can look that documents this change? I’m wondering if there are any other things I have to change from my old ways.
ROOT build instructions have always been clear that CMake builds should be done outside of the source tree (note that also the old ROOT 5 has a “build” directory in its source tree).
Hi @marki , @Wile_E_Coyote ,
just to clarify, the build directory can be a sub-directory of the ROOT sources or it can be a sibling directory. What we mean when we say that in-source builds are not supported is that the build directory cannot be the same directory as the ROOT sources.
As @marki points out, the ROOT sources contain a directory called build already, so you have to use a different name for the build directory if you make it a sub-directory of the source directory. I usually use the name _build or cmake-build-debug, for example. In the future we would like to remove/rename the build directory so that the name is available for…well…actual build directories.
Also cmake -S root -B build && cmake --build build is effectively equivalent to mkdir build; cd build; cmake ../root; cmake --build ., but of course cleaner.
I hope this clarifies things a bit. Let us know if you think something in the build instructions at Building ROOT from source - ROOT should be clarified/improved.