#NEWLINE# def _cmake_version( cmake_path ) : #NEWLINE# #INDENT# command = os . path . join ( version_match , 'cmake' ) #NEWLINE# try : #NEWLINE# #INDENT# simple_exe . output = '' #NEWLINE# simple_exe ( ( '%s --version' % command ) ) #NEWLINE# version_match = re . search ( 'cmake version ([0-9.]+)' , simple_exe . output ) #NEWLINE# del simple_exe . output #NEWLINE# if version_match : #NEWLINE# #INDENT# return Version ( version_match . group ( 1 ) ) #NEWLINE# #UNINDENT# #UNINDENT# except OSError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return None