Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/cmake/CheckTardis.cmake @ 1347

Last change on this file since 1347 was 1072, checked in by rgrieder, 17 years ago

no comment

File size: 920 bytes
Line 
1################# Tardis check ##################
2# This code checks whether the current machine  #
3# is an ETH tardis box.                         #
4#################################################
5
6# only run this test on a lunix/unix machine
7IF (UNIX)
8
9  FIND_PROGRAM(UNAME_CMD "uname"
10  PATHS "/usr/bin /bin")
11  IF(NOT UNAME_CMD)
12    MESSAGE(ERROR "Unable to find uname. Tardis-Check cannot be done.")
13  ENDIF(NOT UNAME_CMD)
14
15  # run uname -n to get nodename
16  EXECUTE_PROCESS(
17  COMMAND "${UNAME_CMD}" "-n"
18  RESULT_VARIABLE UNAME_RV
19  ERROR_VARIABLE UNAME_EV
20  OUTPUT_VARIABLE UNAME_OV)
21
22  IF (NOT "${UNAME_RV}" STREQUAL "0")
23    MESSAGE(ERROR "ERROR: uname terminated unclean.")
24  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
25
26  # check wheter we are on a tardis machine
27  IF ("${UNAME_OV}" MATCHES "tardis")
28    SET (IS_TARDIS ON)
29  ENDIF ("${UNAME_OV}" MATCHES "tardis")
30
31ENDIF (UNIX)
Note: See TracBrowser for help on using the repository browser.