Static if on release build

Guillaume Piolat first.last at gmail.com
Sat Oct 21 19:56:26 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?

Note thatwith D compilers -debug and -release are not opposed to 
each other. A program can have both flags, or none.


More information about the Digitalmars-d-learn mailing list