Changeset 19839


Ignore:
Timestamp:
10/30/19 18:40:29 (5 years ago)
Author:
tbretz
Message:
This hopefully fixes some problems with gloabl installations of root (although this is not really relevant for fact++)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r19836 r19839  
    278278   ENDIF()
    279279
    280    IF(ROOTSYS AND NOT ROOTSYS STREQUAL $ENV{ROOTSYS})
     280   # Is this is a local or a global installation?
     281   IF(ENV{ROOTSYS})
     282      IF(ROOTSYS AND NOT ROOTSYS STREQUAL "$ENV{ROOTSYS}")
     283         MESSAGE(WARNING
     284            " \n"
     285            " ROOT Location changed!\n"
     286            " Present  ROOTSYS: $ENV{ROOTSYS}\n"
     287            " Previous ROOTSYS: ${ROOTSYS}")
     288         FILE(REMOVE thisroot.sh)
     289      ENDIF()
     290
     291      SET(ROOTSYS $ENV{ROOTSYS} CACHE INTERNAL "Internal variable to check for consistency in ROOTSYS")
     292
     293      # For convenience and easy tracking
     294      ADD_CUSTOM_COMMAND(OUTPUT thisroot.sh COMMAND ln -sf ${ROOTSYS}/bin/thisroot.sh VERBATIM)
     295      ADD_CUSTOM_TARGET(thisroot ALL DEPENDS thisroot.sh)
     296   ENDIF()
     297
     298   IF(ROOTVER AND NOT ROOTVER VERSION_EQUAL ROOT_VERSION)
    281299      MESSAGE(WARNING
    282300         " \n"
    283301         " ROOT Version changed!\n"
    284          " Present  ROOTSYS: $ENV{ROOTSYS}\n"
    285          " Previous ROOTSYS: ${ROOTSYS}")
    286       FILE(REMOVE thisroot.sh)
     302         " Present:  ${ROOT_VERSION}\n"
     303         " Previous: ${ROOTVER}")
    287304   ENDIF()
    288305
    289    SET(ROOTSYS $ENV{ROOTSYS} CACHE INTERNAL "Internal variable to check for consistency in ROOTSYS")
    290 
    291    # For convenience and easy tracking
    292    ADD_CUSTOM_COMMAND(OUTPUT thisroot.sh COMMAND ln -sf ${ROOTSYS}/bin/thisroot.sh VERBATIM)
    293    ADD_CUSTOM_TARGET(thisroot ALL DEPENDS thisroot.sh)
     306   SET(ROOTVER ${ROOT_VERSION} CACHE INTERNAL "Internal variable to check for consistency of root version")
    294307
    295308ENDIF(NOT NO_ROOT AND NOT VIEWER_ONLY)
Note: See TracChangeset for help on using the changeset viewer.