简体   繁体   English

如何在虚幻引擎项目中使用C ++ Core Checker?

[英]How to use C++ Core Checker in Unreal Engine project?

Here is an instruction how to use C++ Core Checker: C++ Core Guidelines Checkers available for VS 2015 Update 1. 这是有关如何使用C ++ Core Checker的说明: VS 2015 Update 1可用的C ++ Core Guidelines Checkers。

I installed NuGet package successfully, but cannot use/enable it. 我成功安装了NuGet软件包,但是无法使用/启用它。 There are no options related to static analysis in Property Pages of the project generated by UE. UE生成的项目的“属性页”中没有与静态分析相关的选项。

Trying Analyze → Run Code Analyze achieves nothing too. 尝试分析→运行代码分析也无法实现任何目的。

Trying Analyze → Configure Code Analysis leads to a message “There are currently no analyzable projects loaded”. 尝试分析→配置代码分析会显示一条消息“当前没有加载可分析的项目”。

Why are these projects not analyzable? 为什么这些项目无法分析? Is it possible to change that? 有可能改变吗?

Compiler settings in Unreal 4 are handled by Unreal Build Tool. Unreal 4中的编译器设置由Unreal Build Tool处理。 Turning on static analysis is equivalent to adding "/analyze" flag to compiler options. 打开静态分析等同于在编译器选项中添加“ / analyze”标志。 You can find the place where the build tool manages MSVC compiler and add an option there. 您可以找到构建工具管理MSVC编译器的位置,并在其中添加一个选项。 Better yet, append the option only for your project in Yourproject.Build.cs. 更好的是,仅在Yourproject.Build.cs中为您的项目附加选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM