#NEWLINE# def install_cmake( user_io , bii_paths , interactive ) : #NEWLINE# #INDENT# cmake_path_file = bii_paths . cmake_path_file #NEWLINE# if ( os . path . exists ( cmake_path_file ) and _valid_cmake ( load ( cmake_path_file ) . strip ( ) , user_io ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if _valid_cmake ( '' , user_io ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if interactive : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# path = user_io . request_string ( ( 'If you have cmake > %s installed, please enter path' % _CMAKE_MIN_VERSION ) , 'None' ) #NEWLINE# if ( path == 'None' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if _valid_cmake ( path , user_io ) : #NEWLINE# #INDENT# save ( cmake_path_file , path ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# user_io . out . writeln ( ( "CMake >= %s not found.\nIf you want, biicode can install a local copy of cmake for its use.\nIt won't interfere with your current install if any.\nIf you dont want it, just quit, install it yourself and re-run this setup to enter its path" % _CMAKE_MIN_VERSION ) , Color . BRIGHT_GREEN ) #NEWLINE# install = user_io . request_boolean ( ( 'Install local copy of cmake %s?' % _CMAKE_VERSION ) , default_option = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user_io . out . warn ( "You are running in non-interactive mode.\nA CMake local copy will be installed automatically.\nPlease run with '-i' or '--interactive' for more options" ) #NEWLINE# install = True #NEWLINE# #UNINDENT# if install : #NEWLINE# #INDENT# cmake_install_path = _install_cmake ( user_io , bii_paths ) #NEWLINE# save ( cmake_path_file , cmake_install_path ) #NEWLINE# if ( not _valid_cmake ( cmake_install_path , bii_paths ) ) : #NEWLINE# #INDENT# user_io . out . error ( 'Something failed in the installation of cmake' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user_io . out . success ( ( 'CMake %s installed ok' % _CMAKE_VERSION ) )