Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2392


Ignore:
Timestamp:
Dec 10, 2008, 5:37:29 PM (16 years ago)
Author:
adrfried
Message:

tardis check improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/cmake/CheckTardis.cmake

    r2198 r2392  
    44#################################################
    55
    6 # only run this test on a lunix/unix machine
    76IF (UNIX)
    8   FIND_PROGRAM(UNAME_CMD "uname"
    9   PATHS "/usr/bin /bin")
    10   IF(NOT UNAME_CMD)
    11     MESSAGE(ERROR "Unable to find uname. Tardis-Check cannot be done.")
    12   ENDIF(NOT UNAME_CMD)
    13 
    14   # run uname -n to get nodename
    15   EXECUTE_PROCESS(
    16   COMMAND "${UNAME_CMD}" "-n"
    17   RESULT_VARIABLE UNAME_RV
    18   ERROR_VARIABLE UNAME_EV
    19   OUTPUT_VARIABLE UNAME_OV)
    20 
    21   IF (NOT "${UNAME_RV}" STREQUAL "0")
    22     MESSAGE(ERROR "ERROR: uname terminated unclean.")
    23   ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
    24 
    25   # check wheter we are on a tardis machine
    26   IF ("${UNAME_OV}" MATCHES "tardis")
     7  FILE(STRINGS /etc/hostname HOSTNAME LIMIT_COUNT 1)
     8  IF ("${HOSTNAME}" MATCHES "^tardis-[a-z][0-9][0-9]$")
    279    SET (IS_TARDIS ON)
    28   ENDIF ("${UNAME_OV}" MATCHES "tardis")
    29 
     10  ENDIF ("${HOSTNAME}" MATCHES "^tardis-[a-z][0-9][0-9]$")
    3011ENDIF (UNIX)
    31 
    32 MARK_AS_ADVANCED(IS_TARDIS)
     12MARK_AS_ADVANCED(HOSTNAME IS_TARDIS)
    3313
    3414IF (IS_TARDIS)
     
    4828  SET(ENV{OGREDIR} "/usr/pack/ogre-1.4.5-sd;/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1")
    4929ENDIF (IS_TARDIS)
    50 
    51 MARK_AS_ADVANCED(UNAME_CMD IS_TARDIS)
Note: See TracChangeset for help on using the changeset viewer.