Static if on release build

bauss jj_1337 at live.dk
Fri Oct 20 03:09:59 UTC 2017


On Friday, 20 October 2017 at 02:36:37 UTC, Fra Mecca wrote:
> I can't find any documentation regarding conditional 
> compilation in release and debug mode.
>
> I have read the page regarding the topicon dlang.org but adding 
> the snippet below makes no difference when compiling with dub 
> -b release
> {
> version(full) {
>  //do something
> } else {
> //do something else
> }
>
> How can I produce a release version with different parameters 
> from debug using dub and static if's?

Take a look at this:
https://dlang.org/spec/version.html#DebugCondition


More information about the Digitalmars-d-learn mailing list