parameters: (compiler_path)
return_statement: return sorted(includes_set)
docstring: Gets the system include directories as determined by the clang compiler.
  
    Returns:
      The list of include directories.
docstring_summary: Gets the system include directories as determined by the clang compiler.
docstring_tokens: Gets the system include directories as determined by the clang compiler .
function: 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)
function_tokens: 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 ] # 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 )