msbuild clcompile 规范?(开关到 XML 属性的映射)

J E*_*ans 5 xml tags msbuild specifications

是否有文档将命令行开关映射到 Visual C++ 项目的 MSbuild 属性?在 MSBuild 附带的 Microsoft.CL.common props 文件中找到了最接近我的文件。然而,它对于我正在寻找的东西来说并不完整。

我正在尝试对遗留构建系统进行逆向工程!

这是我需要知道命令行开关将映射到什么的 MSBuild xml 属性的示例:

<ClCompile>
<AssemblerOutput>NoListing</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<UndefineAllPreprocessorDefinition></UndefineAllPreprocessorDefinition>
<BrowseInformation>false</BrowseInformation>
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<CompileAs>Default</CompileAs>
<DisableLanguageExtensions>false</DisableLanguageExtensions>
<ErrorReporting>Prompt</ErrorReporting>
<ErrorReporting>Queue</ErrorReporting>
<ExpandAttributedSource>false</ExpandAttributedSource>
<ExceptionHandling>Sync</ExceptionHandling>
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
</ClCompile>
Run Code Online (Sandbox Code Playgroud)

Sof*_*ter 3

您可以通过右键单击项目并选择“属性”来查看所有属性页和配置选项。

单击属性会给出要传入的命令行开关和简要说明。

属性页配置选项和说明

以下是所有编译器开关及其作用的链接:

按字母顺序列出的编译器选项

如果您想要描述所有开关和属性的 XML 文件,那么您可以通过浏览到以下目录在本地计算机上找到它:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033
Run Code Online (Sandbox Code Playgroud)

您的位置可能略有不同。在这里您将找到所有 xml 属性文件。

查看 CL.xml 文件。

附加信息: VCCLCompilerTool 属性

您还可以引用此链接,其中公开了所有 VCCL 编译器属性。文档好一点。

如何:将自定义工具集成到项目属性中

  • 理想情况下,cl.xml 文件(和其他文件)完全包含所需的信息。 (2认同)