parameters: (compile_dir)
return_statement: return all_include_dirs
docstring: Get all include directories when compiling the PaddlePaddle
      source code.
docstring_summary: Get all include directories when compiling the PaddlePaddle
      source code.
docstring_tokens: Get all include directories when compiling the PaddlePaddle source code .
function: def _get_include_dirs_when_compiling(compile_dir):
      """
      Get all include directories when compiling the PaddlePaddle
      source code.
      """
      include_dirs_file = 'includes.txt'
      path = os.path.abspath(compile_dir)
      include_dirs_file = os.path.join(path, include_dirs_file)
      assert os.path.isfile(include_dirs_file), "File {} does not exist".format(
          include_dirs_file)
      with open(include_dirs_file, 'r') as f:
          include_dirs = [line.strip() for line in f.readlines() if line.strip()]
  
      extra_dirs = ['paddle/fluid/platform']
      all_include_dirs = list(include_dirs)
      for extra_dir in extra_dirs:
          for include_dir in include_dirs:
              d = os.path.join(include_dir, extra_dir)
              if os.path.isdir(d):
                  all_include_dirs.append(d)
      all_include_dirs.append(path)
      all_include_dirs.sort()
      return all_include_dirs
function_tokens: def _get_include_dirs_when_compiling ( compile_dir ) : include_dirs_file = 'includes.txt' path = os . path . abspath ( compile_dir ) include_dirs_file = os . path . join ( path , include_dirs_file ) assert os . path . isfile ( include_dirs_file ) , "File {} does not exist" . format ( include_dirs_file ) with open ( include_dirs_file , 'r' ) as f : include_dirs = [ line . strip ( ) for line in f . readlines ( ) if line . strip ( ) ] extra_dirs = [ 'paddle/fluid/platform' ] all_include_dirs = list ( include_dirs ) for extra_dir in extra_dirs : for include_dir in include_dirs : d = os . path . join ( include_dir , extra_dir ) if os . path . isdir ( d ) : all_include_dirs . append ( d ) all_include_dirs . append ( path ) all_include_dirs . sort ( ) return all_include_dirs