Changeset 19837


Ignore:
Timestamp:
10/30/19 18:32:33 (5 years ago)
Author:
tbretz
Message:
This did not work for system wide installations... new try.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19834 r19837  
    3737STRING(TIMESTAMP VERSION %y.%U.%w.%H UTC)
    3838
     39MESSAGE(STATUS "Cmake V${CMAKE_VERSION}")
    3940MESSAGE(STATUS "Mars V${VERSION}")
    4041
     
    184185ENDIF()
    185186
    186 IF(ROOTSYS AND NOT ROOTSYS STREQUAL $ENV{ROOTSYS})
     187# Is this is a local or a global installation?
     188IF(ENV{ROOTSYS})
     189   IF(ROOTSYS AND NOT ROOTSYS STREQUAL "$ENV{ROOTSYS}")
     190      MESSAGE(WARNING
     191         " \n"
     192         " ROOT Location changed!\n"
     193         " Present  ROOTSYS: $ENV{ROOTSYS}\n"
     194         " Previous ROOTSYS: ${ROOTSYS}")
     195      FILE(REMOVE thisroot.sh)
     196   ENDIF()
     197
     198   SET(ROOTSYS $ENV{ROOTSYS} CACHE INTERNAL "Internal variable to check for consistency in ROOTSYS")
     199
     200   # For convenience and easy tracking
     201   ADD_CUSTOM_COMMAND(OUTPUT thisroot.sh COMMAND ln -sf ${ROOTSYS}/bin/thisroot.sh VERBATIM)
     202   ADD_CUSTOM_TARGET(thisroot ALL DEPENDS thisroot.sh)
     203ENDIF()
     204
     205IF(ROOTVER AND ROOTVER STREQUAL ROOT_VERSION)
    187206   MESSAGE(WARNING
    188207      " \n"
    189208      " ROOT Version changed!\n"
    190       " Present  ROOTSYS: $ENV{ROOTSYS}\n"
    191       " Previous ROOTSYS: ${ROOTSYS}")
    192    FILE(REMOVE thisroot.sh)
    193 ENDIF()
    194 
    195 SET(ROOTSYS $ENV{ROOTSYS} CACHE INTERNAL "Internal variable to check for consistency in ROOTSYS")
    196 
    197 # For convenience and easy tracking
    198 ADD_CUSTOM_COMMAND(OUTPUT thisroot.sh COMMAND ln -sf ${ROOTSYS}/bin/thisroot.sh VERBATIM)
    199 ADD_CUSTOM_TARGET(thisroot ALL DEPENDS thisroot.sh)
     209      " Present  ${ROOT_VERSION}\n"
     210      " Previous ${ROOT_VER}")
     211ENDIF()
     212
     213SET(ROOTVER ROOT_VERSION CACHE INTERNAL "Internal variable to check for consistency of root version")
    200214
    201215# -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree
Note: See TracChangeset for help on using the changeset viewer.