Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

msbuild clcompile specification? (Mapping of switches to XML properties)

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>
like image 797
J Evans Avatar asked Mar 01 '15 14:03

J Evans


People also ask

How to run vcxproj file in Visual Studio?

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.

What is MSBuild command line?

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 .

How do I get MSBuild command from Visual Studio?

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.


1 Answers

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.

like image 93
stijn Avatar answered Sep 21 '22 23:09

stijn