lewissbaker / cake

Cake is a fast build system written in Python.
MIT License
20 stars 6 forks source link

Add macros defines #20

Closed anlongfei closed 4 years ago

anlongfei commented 4 years ago

https://github.com/lewissbaker/cake/issues/19

donno commented 4 years ago

You have defined the option but nothing is making use of the option. There is no corresponding change that is reading the defMacros option that you are specifying.

Cake is not necessarily going to have a tool that has macros, so it is tricky for you configure it out-of-box to pass the contents of the defMacros option to the compiler.

As such you would be better off defining adding the option/argument to the parser in an args.cake of the project. See cake/examples/args.cake for an example for how to define it.

Then use engine.options.defMacros in the config.cake for the project to read the macros defined and pass them to the compiler tool.

anlongfei commented 4 years ago

ok, thanks.