def PrepareCmake():
 if (os.environ['BUILDBOT_CLOBBER'] == '1'):
  print '@@@BUILD_STEP Clobber CMake checkout@@@'
  shutil.rmtree(CMAKE_DIR)
 if os.path.isdir(CMAKE_DIR):
  return
 print '@@@BUILD_STEP Initialize CMake checkout@@@'
 os.mkdir(CMAKE_DIR)
 print '@@@BUILD_STEP Sync CMake@@@'
 CallSubProcess(['git', 'clone', '--depth', '1', '--single-branch', '--branch', 'v2.8.8', '--', 'git://cmake.org/cmake.git', CMAKE_DIR], cwd=CMAKE_DIR)
 print '@@@BUILD_STEP Build CMake@@@'
 CallSubProcess(['/bin/bash', 'bootstrap', ('--prefix=%s' % CMAKE_DIR)], cwd=CMAKE_DIR)
 CallSubProcess(['make', 'cmake'], cwd=CMAKE_DIR)

def PrepareCmake ( ) : if ( os . environ [ 'BUILDBOT_CLOBBER' ] == '1' ) : print '@@@BUILD_STEP Clobber CMake checkout@@@' shutil . rmtree ( CMAKE_DIR ) if os . path . isdir ( CMAKE_DIR ) : return print '@@@BUILD_STEP Initialize CMake checkout@@@' os . mkdir ( CMAKE_DIR ) print '@@@BUILD_STEP Sync CMake@@@' CallSubProcess ( [ 'git' , 'clone' , '--depth' , '1' , '--single-branch' , '--branch' , 'v2.8.8' , '--' , 'git://cmake.org/cmake.git' , CMAKE_DIR ] , cwd = CMAKE_DIR ) print '@@@BUILD_STEP Build CMake@@@' CallSubProcess ( [ '/bin/bash' , 'bootstrap' , ( '--prefix=%s' % CMAKE_DIR ) ] , cwd = CMAKE_DIR ) CallSubProcess ( [ 'make' , 'cmake' ] , cwd = CMAKE_DIR )
build cmake 2 .