Skip to content
Snippets Groups Projects

WIP: Preset CMAKE_INSTALL_PREFIX from the toolchain

Closed Marco Clemencic requested to merge preset-install-prefix into master

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?

Edited by Marco Clemencic

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I vote for adding this LegacyGaudiCMakeSupport.cmake. In a default configuration the installation should go to the CMAKE_INSTALL_PREFIX defined at config time, I think.

  • 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 of cmake --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 in LegacyGaudiCMakeSupport.cmake, but that will not apply to, e.g., GitCondDB, it will work only for Gaudi, 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
  • Marco Clemencic marked as a Work In Progress

    marked as a Work In Progress

  • I close this as CMAKE_INSTALL_PREFIX is currently defined in LegacyGaudiCMakeSupport.cmake.

Please register or sign in to reply
Loading