Skip to content

Resolve "build out-of-source"

Carsten Burgard requested to merge 244-build-out-of-source into master

Release notes

all auto-generated files have now been moved out of the source tree into the build tree, allowing to have two completely disjoint build trees for the same source tree (standalone and ASG setup on the same machine)

While there are currently some measures in place to ease the transition it is planned to remove these in the near future and only support true "out-of-source" builds. Due to this (as well as some other changes) the following adjustment as recommended to analysis projects' CMakeLists.txt (based on CAFExample, see also the changes in this MR: CAFExample!87 (merged)):

  • For testing in a standalone (non-ASG) environment we recommend using this container image in the CI: image: gitlab-registry.cern.ch/atlas-caf/cafcore/cafcore-standalone-base:19.06.X (instead of what was previously also used in CAFExample image: rootproject/root-ubuntu16). CAFCore will not compile in the root-ubuntu16 image due to a too old cmake version!
  • Replace the following block in you CMakeLists.txt
execute_process(COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup/writeSetupScript.py ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/setup ${CMAKE_CURRENT_SOURCE_DIR}/CAFCore --binDir ${CMAKE_CURRENT_BINARY_DIR})

with

  execute_process(COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup/writeSetupScript.py ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/setup ${CMAKE_CURRENT_BINARY_DIR}/CAFCore --binDir ${CMAKE_CURRENT_BINARY_DIR})

(there are likely two ocurances, both should be replaced!)

Also, a new folder CAFPluginSetup has been created such that cafsetup.sh automatically picks up all setup scripts located there.

Details

most files have been setup to be generated directly in the CMAKE_CURRENT_BINARY_DIR, the only exception being that cafsetup.sh is still created as a symlink in the old location pointing to the new one.

Closes #244 (closed)

Edited by Konstantin Lehmann

Merge request reports