tools/android/eclipse/generate_cdt_clang_settings.py
def GetClangIncludeDirectories(compiler_path):
  """Gets the system include directories as determined by the clang compiler.

  Returns:
    The list of include directories.
  """

  includes_set = set()

  command = [compiler_path, '-E', '-xc++', '-v', '-']
  proc = subprocess.Popen(args=command, stdin=subprocess.PIPE,
                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  output = proc.communicate()[1]
  # Extract the list of include dirs from the output, which has this format:
  #   ...
  #   #include "..." search starts here:
  #   #include <...> search starts here:
  #    /usr/include/c++/4.6
  #    /usr/local/include
  #   End of search list.
  #   ...
  in_includes_list = False
  for line in output.splitlines():
    if line.startswith('#include'):
      in_includes_list = True
      continue
    if line.startswith('End of search list.'):
      break
    if in_includes_list:
      includes_set.add(line.strip())

  return sorted(includes_set)
Gets the system include directories as determined by the clang compiler.

  Returns:
    The list of include directories.
  
Gets the system include directories as determined by the clang compiler.
Gets the system include directories as determined by the clang compiler .
def GetClangIncludeDirectories(compiler_path):
  includes_set = set()
  command = [compiler_path, '-E', '-xc++', '-v', '-']
  proc = subprocess.Popen(args=command, stdin=subprocess.PIPE,
                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  output = proc.communicate()[1]
  in_includes_list = False
  for line in output.splitlines():
    if line.startswith('#include'):
      in_includes_list = True
      continue
    if line.startswith('End of search list.'):
      break
    if in_includes_list:
      includes_set.add(line.strip())
  return sorted(includes_set)
def GetClangIncludeDirectories ( compiler_path ) : includes_set = set ( ) command = [ compiler_path , '-E' , '-xc++' , '-v' , '-' ] proc = subprocess . Popen ( args = command , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) output = proc . communicate ( ) [ 1 ] in_includes_list = False for line in output . splitlines ( ) : if line . startswith ( '#include' ) : in_includes_list = True continue if line . startswith ( 'End of search list.' ) : break if in_includes_list : includes_set . add ( line . strip ( ) ) return sorted ( includes_set )
Gets the system include directories as determined by the clang compiler.
Gets the system include directories as determined by the clang compiler .
"""Gets the system include directories as determined by the clang compiler.

  Returns:
    The list of include directories.
  """ # Extract the list of include dirs from the output, which has this format: #   ... #   #include "..." search starts here: #   #include <...> search starts here: #    /usr/include/c++/4.6 #    /usr/local/include #   End of search list. #   ...
The list of include directories.
The list of include directories .
compiler_path