c++ - How to support complex project configurations in Visual Studio? -


i'm working on project requires whole multi-dimensional matrix of configurations. theres (debug / release / optimised / final), (editor / non-editor), (win32 / win64 / ios / android), (usa / europe / asia) etc. different build targets (ie win32_europe_debug_editor.exe) , own set of libraries, includes, #defines , on.

is there way add more dropdowns project configuration toolbar in visual studio? @ moment there's "platforms" , "configurations". i've got win32/win64/ios/android in platforms, there's still dozens of different configurations.

"don't set project this" is, unfortunately, out of hands - way contracting company wants it, , we're bound that.

i know made lot easier going through msbuild, i'm hoping find out if there's way while @ least partially staying within visual studio interface, that's rest of team used to. it's tricky enough setup is, , i'd minimise amount of cognitive load have take on!

thanks!

you cannot add more parameters .sln file, fixed support 2 -- platform , configuration. if want visual studio work different parameters of product, have 2 options.

1.expand configuration parameter contain additional values, cross product of multiple sets. e.g. case, original parameters follows:

configuration={debug, release, optimised, final} editor={editor, noneditor} region={usa, europe} 

you might convert them equivalent selection of configurations:

configuration={debug_editor_usa, debug_editor_europe, debug_noneditor_usa, debug_noneditor_europe, release_editor_usa, ... } 

this of course has scalability problems, works small set of additional parameters. also, note similar attempt expand selection of platform parameter not work, because many targets work standard values of platform property.

2.you can leave additional parameters in .**proj files, defaults can override environment variables. e.g. if have following section in every project in solution:

<propertygroup>     <editortype condition="'$(ide_editor_type)' != ''">$(ide_editor_type)</editortype>     <editortype condition="'$(editortype)' != ''">noneditor</editortype>     <regiontype condition="'$(ide_region_type)' != ''">$(ide_region_type)</regiontype>     <regiontype condition="'$(regiontype)' != ''">usa</regiontype> </propertygroup> 

,then values of additional parameters overriden setting env variables, while default values noneditor , usa. have vs ide pick non-default values, have following:

  • open vs cmd window
  • cd location of .sln
  • set ide_editor_type=editor
  • set ide_region_type=europe
  • devenv mysolution.sln

vs ide, launched way use these settings perform build, debug, intellisense, etc. btw, when change parameters, intellisense needs rebuilt, easiest way delete file mysolution.sdf before launching devenv.


Popular posts from this blog