Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7789

ROOTConfig.cmake should not set CMAKE_MODULE_PATH nor install FindX modules

    XMLWordPrintable

    Details

      Description

      By default, ROOTConfig.cmake appends the installed "cmake/modules/" directory to CMAKE_MODULE_PATH. With certain modules in that directory overriding core functionality and/or supplying FindX cmake modules, this can make build behaviour highly dependent on the ordering of find_package calls in a client project (and difficult to debug...).

      It might be better to

      1. Only append to CMAKE_MODULE_PATH in ROOTUseFile.cmake (or not at all and simply include RootNewMacros.cmake by full path)
      2. If FindX.cmake modules are to be installed (I'm aware of ROOT-7572, but this appears to not be present in at least 6.04.06), then they should be partitioned into another subdirectory which is only added to CMAKE_MODULE_PATH by an explicit function/macro call.

        Attachments

          Activity

            People

            • Assignee:
              mato Pere Mato Vila
              Reporter:
              bmorgan Benjamin Morgan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: