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>
vcxproj file by using any text or XML editor. You can view it in Visual Studio by right-clicking on the project in Solution Explorer, choosing Unload project and then choosing Edit Foo. vcxproj.
Use MSBuild at a command promptCommand-line options let you set properties, execute specific targets, and set other options that control the build process. For example, you would use the following command-line syntax to build the file MyProj. proj with the Configuration property set to Debug .
If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2022, it's installed under the Visual Studio installation folder. For a typical default installation on Windows 10, MSBuild.exe is under the installation folder in MSBuild\Current\Bin.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With