WIP: Preset CMAKE_INSTALL_PREFIX from the toolchain
This allow to call "make install" and have the binaries installed in InstallArea/<platform>
, but I'm not too convinced this setting belongs to the toolchain, it looks more like a setting that should go in https://gitlab.cern.ch/lhcb-core/LbDevTools/-/blob/master/LbDevTools/data/cmake/LegacyGaudiCMakeSupport.cmake
@bcouturi, what do you think?
Merge request reports
Activity
At the moment, in the nightlies, when dealing with new style CMake (or plain CMake projects), I do
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=... cmake --build build cmake --install build --prefix InstallArea/${BINARY_TAG}
the
CMAKE_INSTALL_PREFIX
variable is not touched (so it still defaults to/usr/local
) and I use the prefix override ofcmake --install
.This is fine in the nightlies (and GitCondDB builds like a charm), but a regular LHCb user will have troubles because a
make install
will not work.I could set
CMAKE_PREFIX_PATH
inLegacyGaudiCMakeSupport.cmake
, but that will not apply to, e.g.,GitCondDB
, it will work only forGaudi
,Detector
,LHCb
, ...With the setting in the toolchain, it will work for
GitCondDB
,DD4hep
,Geant4
, etc., but is it what we want?(yes we should set it at configure time, and both option would do it)
Edited by Marco Clemencic