I would like to ask for the proper usage of cmake and git to recompile/reinstall root in the following two scenarios:
SCENARIO A)
Typically after a pull of master from origin or the selection of a different tag, I want to recompile root and install to a different directory. Since I have still the previous build dir, in principle I should not need to recompile everything from scratch… that is all the point about makefiles … isn’t?
But how should I specify the new target directory? From googling I learn that I can change the CMAKE_INSTALL_PREFIX
but if I try:
cmake -DCMAKE_INSTALL_PREFIX=/path/to/new/directory --build . --target install
it does not work. Another option found is to directly call make install DESTDIR=/path/to/new/directory
but there are also some warning related to this DESTDIR
option of Makefiles.
SCENARIO B)
I want to install the same version of root on multiple machines, exploiting the fact that all the machines are clones of the same Debian 9 installation, and are kept up-to-date centrally (or in any case I can make sure that they all have the required packages installed).
So I would like to compile it only once, on one of these machines, and then install on all the others. Via sshfs I can mount the remote target directories on the machine where I have already compiled, to avoid to scp around the build directory (which btw would not work because cmake discovers that the build directory has been relocated…).
But again how can I change the CMAKE_INSTALL_PREFIX
?
Thanks in advance for the hints,
Matteo
ROOT Version: any
Platform: Debian 9
Compiler: gcc