Best way to generate parameters in VisualStudio project files

I am creating VisualStudio C ++ project files from a build system. The XML compiler options for the project file are in a different format from the command line options specified for the compiler.

I need to get from the command line parameters for cl.exe the project file parameters for VCCLCompilerTool.

1 - Does anyone know of an open script designed to do this?

2 - If you remove all options from XML and put all command line options in the "AdditionalOptions" attribute, will it filter these or all added to the command line verbatim? will the "AdditionalOptions" options exceed the default values ​​if there are options in the user interface? (I didn't write the cl.exe proxy to check what it actually gets in this case :)

Thank!!!!

+2


source to share


1 answer


One solution might be to use Property Sheets (vsprops). You can create a vsprops file for each option you intend to use (this is done from the property editor in visual studio). Then, in the generated project file file, specify each property page that contains the parameter (s) that you intend to use in the InheritedPropertySheets sequence. We do something similar by grouping different options together with their respective sheets. For example, we use the following sets of properties:



 ARMASM.rules
 C++ Standards Compliance.vsprops
 Debug Program Database.vsprops
 Debug.vsprops
 Multi-Threaded Debug Libraries.vsprops
 Multi-Threaded Release Libraries.vsprops
 Optimize for Size.vsprops
 Platform Directory.vsprops
 Release.vsprops
 Static Library.vsprops
 Strictest Warnings.vsprops
 Win32.vsprops
 WinCE.vsprops

      

+4


source







All Articles