How to use a response file and a custom build rule?

If we use a custom build rule, we have something like on the .rule we create:
<Rules>
      <CustomBuildRule
         Name="MyCompiler"
         DisplayName="My Super compiler"
         CommandLine="mycompiler.exe /nologo /c [AllOptions] [AdditionalOptions] /Fo&quot;$(IntDir)\$(InputName).obj&quot; /Ta [inputs]"
         Outputs="$(IntDir)\$(InputName).obj"
         FileExtensions="*.cpp"
         ExecutionDescription="Super Compiling..."
         ShowOnlyRuleProperties="true"
...

By this way, you are limited by the number of characters passed on the command line. If you have a lot of inputs file, for example, you will get an error with the cmd.exe because you reach the limit of 8192 characters.
The solution is probably to create a response file just before but how to do that with custom rules Is there a special variable to add into this XML file to force the rule to create a response file !

Help!!!

Christophe D.




Answer this question

How to use a response file and a custom build rule?