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

ROOTConfig CMake file hardcodes paths from the build directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.16/00
    • Fix Version/s: 6.18/00, 6.16/02
    • Component/s: Build System
    • Labels:
      None
    • Environment:
      • Any OS: identical issue experienced on CC7 and macOS Mojave
      • CMake v3.13.1

      Description

      We are experiencing problems with the file:

      $ROOTSYS/cmake/ROOTConfig-targets.cmake

      as it is created in the installation directory. The file contains the block for implicit multithreading:

      set_target_properties(ROOT::Imt PROPERTIES
      {{ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"}}
      {{ INTERFACE_LINK_LIBRARIES "ROOT::Core;ROOT::Thread;<PATH_TO_BUILD_DIR>/lib/libtbb.so"}}
      )

      In ROOT version v6-14-08 there is no reference to libtbb. Now there is the reference, however it points to the build directory, not the installation one.

      When we have other CMake-based projects using ROOT and this file specifically (through find_package) we end up having problems at link time for our libraries, since ROOT's build directory no longer exists.

      I am currently working around the problem by relocating the file manually but I think this should be fixed in ROOT.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amadio Guilherme Amadio
                Reporter:
                dberzano Dario Berzano (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Actual Start:
                  Actual End: