parameters: (environ, env_var_subfolders, workspaces)
return_statement: return lines
docstring: Generate shell code to prepend environment variables
      for the all workspaces.
docstring_summary: Generate shell code to prepend environment variables
      for the all workspaces.
docstring_tokens: Generate shell code to prepend environment variables for the all workspaces .
function: def prepend_env_variables(environ, env_var_subfolders, workspaces):
      '''
      Generate shell code to prepend environment variables
      for the all workspaces.
      '''
      lines = []
      lines.append(comment('prepend folders of workspaces to environment variables'))
  
      paths = [path for path in workspaces.split(os.pathsep) if path]
  
      prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '')
      lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix))
  
      for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']):
          subfolder = env_var_subfolders[key]
          prefix = _prefix_env_variable(environ, key, paths, subfolder)
          lines.append(prepend(environ, key, prefix))
      return lines
function_tokens: def prepend_env_variables ( environ , env_var_subfolders , workspaces ) : lines = [ ] lines . append ( comment ( 'prepend folders of workspaces to environment variables' ) ) paths = [ path for path in workspaces . split ( os . pathsep ) if path ] prefix = _prefix_env_variable ( environ , 'CMAKE_PREFIX_PATH' , paths , '' ) lines . append ( prepend ( environ , 'CMAKE_PREFIX_PATH' , prefix ) ) for key in sorted ( [ key for key in env_var_subfolders . keys ( ) if key != 'CMAKE_PREFIX_PATH' ] ) : subfolder = env_var_subfolders [ key ] prefix = _prefix_env_variable ( environ , key , paths , subfolder ) lines . append ( prepend ( environ , key , prefix ) ) return lines