In order to support development of packages using Cetmodules 4 when released, the following additions will need to be made to MPD functionality:
-
The generated presets file should include the clause in a "cacheVariables" table:
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES" : {
"type" : "STRING",
"value" : "CetProvideDependency"
}
-
The top-level CMakeLists.txt should contain the following code
########################################################################
# Ensure we have access to a suitable version of Cetmodules
include(FetchContent)
FetchContent_Declare(
cetmodules
GIT_REPOSITORY https://github.com/FNALssi/cetmodules
GIT_TAG 4.00.00
FIND_PACKAGE_ARGS 4.00.00
)
FetchContent_MakeAvailable(cetmodules)
########################################################################
find_package(cetmodules 4.00.00 REQUIRED)
immediately before the project() call. Following best practice, GIT_TAG should actually be the commit hash to which the desired tag points.
N.B. If CMAKE_PREFIX_PATH points to a suitable version of Cetmodules matching FIND_PACKAGE_ARGS, then it will be used instead of downloading the source via FetchContent.
Including Cetmodules at this stage should not prevent the development of packages that do not use Cetmodules themselves.
In order to support development of packages using Cetmodules 4 when released, the following additions will need to be made to MPD functionality:
The generated presets file should include the clause in a "cacheVariables" table:
The top-level CMakeLists.txt should contain the following code
immediately before the
project()call. Following best practice,GIT_TAGshould actually be the commit hash to which the desired tag points.N.B. If
CMAKE_PREFIX_PATHpoints to a suitable version of Cetmodules matchingFIND_PACKAGE_ARGS, then it will be used instead of downloading the source viaFetchContent.Including Cetmodules at this stage should not prevent the development of packages that do not use Cetmodules themselves.