Changeset 2392
- Timestamp:
- Dec 10, 2008, 5:37:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem/cmake/CheckTardis.cmake
r2198 r2392 4 4 ################################################# 5 5 6 # only run this test on a lunix/unix machine7 6 IF (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]$") 27 9 SET (IS_TARDIS ON) 28 ENDIF ("${UNAME_OV}" MATCHES "tardis") 29 10 ENDIF ("${HOSTNAME}" MATCHES "^tardis-[a-z][0-9][0-9]$") 30 11 ENDIF (UNIX) 31 32 MARK_AS_ADVANCED(IS_TARDIS) 12 MARK_AS_ADVANCED(HOSTNAME IS_TARDIS) 33 13 34 14 IF (IS_TARDIS) … … 48 28 SET(ENV{OGREDIR} "/usr/pack/ogre-1.4.5-sd;/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1") 49 29 ENDIF (IS_TARDIS) 50 51 MARK_AS_ADVANCED(UNAME_CMD IS_TARDIS)
Note: See TracChangeset
for help on using the changeset viewer.