当前位置: 首页>>代码示例>>Python>>正文


Python clang_helpers.PrepareClangFlags类代码示例

本文整理汇总了Python中clang_helpers.PrepareClangFlags的典型用法代码示例。如果您正苦于以下问题:Python PrepareClangFlags类的具体用法?Python PrepareClangFlags怎么用?Python PrepareClangFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PrepareClangFlags类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FlagsForFile

def FlagsForFile(filename):
    if database:
        # Bear in mind that compilation_info.compiler_flags_ does NOT return a
        # python list, but a "list-like" StringVec object
        compilation_info = database.GetCompilationInfoForFile(filename)
        final_flags = PrepareClangFlags(
            MakeRelativePathsInFlagsAbsolute(compilation_info.compiler_flags_, compilation_info.compiler_working_dir_),
            filename,
        )

        # NOTE: This is just for YouCompleteMe; it's highly likely that your project
        # does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
        # ycm_extra_conf IF YOU'RE NOT 100% YOU NEED IT.
        try:
            final_flags.remove("-stdlib=libc++")
        except ValueError:
            pass
    else:
        relative_to = DirectoryOfThisScript()

        # not handling double path delimiters...
        if filename.startswith(relative_to):
            subdir = filename[len(relative_to) :].split("/")[1]
        else:
            subdir = None

        final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to, subdir)

    return {"flags": final_flags, "do_cache": True}
开发者ID:harunpehlivan,项目名称:StreamHub-iOS-SDK,代码行数:29,代码来源:.ycm_extra_conf.py

示例2: FlagsForFile

def FlagsForFile( filename ):
  if database:
    # Bear in mind that compilation_info.compiler_flags_ does NOT return a
    # python list, but a "list-like" StringVec object
    compilation_info = database.GetCompilationInfoForFile( filename )
    final_flags = PrepareClangFlags(
        MakeRelativePathsInFlagsAbsolute(
            compilation_info.compiler_flags_,
            compilation_info.compiler_working_dir_ ),
        filename )

    # NOTE: This is just for YouCompleteMe; it's highly likely that your project
    # does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
    # ycm_extra_conf IF YOU'RE NOT 100% YOU NEED IT.
    try:
      final_flags.remove( '-stdlib=libc++' )
    except ValueError:
      pass
  else:
    relative_to = DirectoryOfThisScript()
    final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )

  return {
    'flags': final_flags,
    'do_cache': True
  }
开发者ID:mtzstngl,项目名称:RSA_Encryption,代码行数:26,代码来源:.ycm_extra_conf.py

示例3: FlagsForFile

def FlagsForFile(filename):
    if database:
        # Bear in mind that compilation_info.compiler_flags_ does NOT return a
        # python list, but a "list-like" StringVec object
        compilation_info = database.GetCompilationInfoForFile(filename)
        final_flags = PrepareClangFlags(
            MakeRelativePathsInFlagsAbsolute(
                compilation_info.compiler_flags_,
                compilation_info.compiler_working_dir_),
            filename)
        relative_to = DirectoryOfThisScript()
        final_flags.extend(MakeRelativePathsInFlagsAbsolute(flags, relative_to))
    else:
        relative_to = DirectoryOfThisScript()
        final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to)

    return {
        'flags': final_flags,
        'do_cache': True}
开发者ID:mgharbi,项目名称:gravity,代码行数:19,代码来源:.ycm_extra_conf.py


注:本文中的clang_helpers.PrepareClangFlags类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。