Enhancement to PreprocessintTool

software-model

(Schalk Cronjé) #1

Continuing the discussion from How to use PreprocessingTool in Gradle?:

PreprocessingTool currently only has define(name) and define(name,description) methods. This makes it clunky to use with lots of defines. It would be better to probably have the following as the methods on the interface.

define( String... names) 
define(Map<String,String> defs)


This will allow for

  cppCompiler.define 'NDEBUG', '__STDC_LIMIT_MACROS', '__STDC_CONSTANT_MACROS'

and

  cppCompiler FOO : 'bar', FOO2 : 'bar2'

(Schalk Cronjé) #2

Aaargghh, just realised there is a macros method which allows for doing the second (map) suggestion. I would still like to see an array version for just defining macros,