Header Relocatability, main branch (2024.06.03.)
After discussing about it in the S&C Workshop today, these are updates needed to put the project's public headers into a unique directory using CMAKE_INSTALL_INCLUDEDIR. Many of the libraries had this set up correctly already, but many of them had include
hardcoded for the directory that would be picked up by the clients. (Everything was using ${CMAKE_INSTALL_INCLUDEDIR}
correctly for the corresponding install(...) commands already.)
The end-goal here is to be able to do this sort of a thing:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_INCLUDEDIR="include/GeoModel" -S GeoModel -B build
Which would then result in an installed directory layout like:
├── include
│ └── GeoModel
│ ├── GeoGenericFunctions
│ ├── GeoModelDBManager
│ ├── GeoModelHelpers
│ ├── GeoModelIOHelpers
│ ├── GeoModelKernel
│ ├── GeoModelRead
│ ├── GeoModelWrite
│ └── TFPersistification
└── lib
└── cmake
├── GeoModelCore
└── GeoModelIO
, instead of the default:
├── include
│ ├── GeoGenericFunctions
│ ├── GeoModelDBManager
│ ├── GeoModelHelpers
│ ├── GeoModelIOHelpers
│ ├── GeoModelKernel
│ ├── GeoModelRead
│ ├── GeoModelWrite
│ └── TFPersistification
└── lib
└── cmake
├── GeoModelCore
└── GeoModelIO
What's more, the generated CMake code (after this MR) also respects this layout.
# Create imported target GeoModelCore::GeoModelKernel
add_library(GeoModelCore::GeoModelKernel SHARED IMPORTED)
set_target_properties(GeoModelCore::GeoModelKernel PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/GeoModel"
INTERFACE_LINK_LIBRARIES "Eigen3::Eigen;GeoModelCore::GeoGenericFunctions;dl"
)
(This MR is all about this very last thing.)
Pinging @boudreau, @emoyse, @pagessin.
P.S. Since I use VSCode, I'm also sneaking a convenience update into this MR.
Merge request reports
Activity
- Resolved by Vakhtang Tsulaia
- Resolved by Joseph Boudreau
- Resolved by Vakhtang Tsulaia
Now that we're all back from the S&C week, it would be good to get back to this.
Does anyone have an idea of why the CI is failing?As far as I can tell, my fork of the repository is public. So I don't know why the job in question fails.
- Resolved by Joseph Boudreau
The pipeline looks mostly good. We have a failure in the Run3 MC test which does not look related to this MR. So, let me suggest we go ahead and merge it.
Any objections?
mentioned in merge request !328 (merged)
mentioned in merge request atlas/atlasexternals!1136 (merged)
mentioned in merge request !333 (closed)
mentioned in commit acts/acts-gh-sync@d89cb7db
mentioned in merge request !344