Ask a questionAsk a question
 

QuestionMSBuild 4.0: Changing command line switch from slash to hyphen

  • Tuesday, March 31, 2009 11:41 AMAnton Kochepasov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In VS 10 and MsBuild 4.0 the "\Program Files\MSBuild\Microsoft.Cpp\v4.0\cl.xml" file contains descriptions of a property, for instance:
        <EnumValue Name="TurnOffAllWarnings" Switch="W0 ">
          <EnumValue.DisplayName>
            <sys:String>Turn Off All Warnings</sys:String>
          </EnumValue.DisplayName>
          <EnumValue.Description>
            <sys:String>Level 0 disables all warnings.</sys:String>
          </EnumValue.Description>
        </EnumValue>

    It gives / W0 option in the command line even though the slash seems not to being specified anywhere.

    We're creating a similar set of files for our compiler, but it uses options with hyphens.
    Is it possible to change the slash (/ ) to hyphen (- ) somehow in the XML description or MSBuild target files?


    Anton