Skip to content

Changes to MPD necessary to support Cetmodules >=4 #26

@greenc-FNAL

Description

@greenc-FNAL

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions