Is there a document that maps the command line switches to the MSbuild properties for a Visual C++ project? The closest I've got is found in the Microsoft.CL.common props file that is shipped with MSBuild. However it is not complete for what I am looking for.
I am trying to reverse engineer a legacy build system!
Here is an example of the MSBuild xml properties that I need to know what the command line switches would map to:
<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>
The msbuild task ultimately invoked for compilation is CL
. Hence the documentation can be found when looking for msbuild CL task
:
https://docs.microsoft.com/en-us/visualstudio/msbuild/cl-task
Likewise there is the LINK
task, the LIB
task and so on. These might also be of interest for you: compiler options alone might not be enough.
You can see all the property pages and configuration options by right clicking your project and selecting Properties.
Clicking on a property gives the command line switch to pass in and a brief description.
Here is a link to all the compiler switches and what they do:
Compiler Options Listed Alphabetically
If you want the XML file that describes all the switches and properties then you can find it on your local computer by browsing to this directory:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033
Your location may vary slightly. Here you will find all the xml property files.
Take a look at the CL.xml file.
Additional info: VCCLCompilerTool Properties
You can also reference this link that exposes all the VCCL compiler properties. The documentation is a little better.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.