digitalmars.D - list all debug / version identifiers during compile time
- =?UTF-8?B?IsOYaXZpbmQi?= (5/5) Mar 02 2014 Is there a way to list all debug / version identifiers currently
- Tolga Cakiroglu (4/9) Mar 02 2014 For every "version" defined part, you can use `pragma(msg,
- =?UTF-8?B?IsOYaXZpbmQi?= (8/19) Mar 02 2014 What I really want to achieve with this is error-check the
Is there a way to list all debug / version identifiers currently in effect using e.g. traits? Would be useful in order to validate, from the program itself, that the parameters (version/debug) it is built with actually match the parameters it implements.
Mar 02 2014
On Sunday, 2 March 2014 at 17:29:27 UTC, Øivind wrote:Is there a way to list all debug / version identifiers currently in effect using e.g. traits? Would be useful in order to validate, from the program itself, that the parameters (version/debug) it is built with actually match the parameters it implements.For every "version" defined part, you can use `pragma(msg, "Version ID");` which will print that message for active version parts for you.
Mar 02 2014
On Sunday, 2 March 2014 at 19:01:17 UTC, Tolga Cakiroglu wrote:On Sunday, 2 March 2014 at 17:29:27 UTC, Øivind wrote:What I really want to achieve with this is error-check the version/debug identifiers that the program has been compiled with.. e.g. if I compile the program a version-identifier with a typo: dmd main.d -version=Inclde_FOO then I want the program to be able to detect this by listing all version-identifiers and checking them..Is there a way to list all debug / version identifiers currently in effect using e.g. traits? Would be useful in order to validate, from the program itself, that the parameters (version/debug) it is built with actually match the parameters it implements.For every "version" defined part, you can use `pragma(msg, "Version ID");` which will print that message for active version parts for you.
Mar 02 2014