Conditional inclusion of addons

Hi OF people!

I am working in a project that I would like to control whether an addon is included or not depending on a compiler flag (at the moment I would like to include this addon in debug only).

I could obviously add ifdef guarding all the code in every cpp file in this addon; but messing with other people addons is not polite and the when you update the code it gets nasty…

Another possibility would be creating a script adding or removing the addon from addons.make just before compiling, but I feel that I would lose control over the make command, apart of complicating everything.

So I was wondering if there was some directive to conditionally include an specified addon depending on a flag, or depending on the target (debug, release).


Hi there,

What platform are you on? What IDE if any?

I am using linux - make, editing with Sublime Text.

Not much experience there, but maybe this is helpful. Maybe you can modify your own project’s addons.make file depending on your target