While packaging cetmodules for conda and aliBuild/bits for SHiP, I noticed that not all modules/tools are available included in the CMake config.
The cetmodulesConfig.cmake generated by cet_cmake_config() should auto-include the core modules that cetmodules' own CMakeLists.txt loads (all of which use include_guard(), so double-inclusion is safe). This would make find_package(cetmodules) a drop-in replacement for the FetchContent path, which is important for package managers (conda, spack, etc.) that provide pre-built cetmodules, requiring (trivial) patches.
I can prepare a small PR to address this, the patch we apply during the build currently is:
# Patch config so find_package(cetmodules) includes modules loaded via FetchContent
cat >> "${PREFIX}/share/cetmodules/cmake/cetmodulesConfig.cmake" <<'EOF'
include(CetProvideDependency)
include(CetCMakeEnv)
include(CetCMakeUtils)
include(CetCMakeConfig)
include(CetMake)
EOF
While packaging cetmodules for conda and aliBuild/bits for SHiP, I noticed that not all modules/tools are available included in the CMake config.
The cetmodulesConfig.cmake generated by cet_cmake_config() should auto-include the core modules that cetmodules' own CMakeLists.txt loads (all of which use include_guard(), so double-inclusion is safe). This would make find_package(cetmodules) a drop-in replacement for the FetchContent path, which is important for package managers (conda, spack, etc.) that provide pre-built cetmodules, requiring (trivial) patches.
I can prepare a small PR to address this, the patch we apply during the build currently is: