September 21, 2012 how to get version identifiers set during compilation? | ||||
---|---|---|---|---|
| ||||
how to get version identifiers set during compilation? ideally would be something like: enum versions=VersionFlags;//returns ["OSX","debug"] for example one use case is to have arbitrary logic on versions without requiring new syntax. eg: static if(VersionFlags.canFind("OSX") && !VersionFlags.canFind("debug") ){...} but there are other uses. related question: how to get compilation flags that were set? eg search paths It doesn't seem currently possible, is there interest in having it implemented? perhaps in std.compiler? |
Copyright © 1999-2021 by the D Language Foundation