DMD: Versioning compilation: generate Identifier for each compilation and writeln it.

BoQsc vaidas.boqsc at gmail.com
Sat Aug 19 08:49:35 UTC 2023


I would like to display some identifier that is set after 
compilation and remains unchanged.
This is to recognise and check if two binaries belong to the same 
compilation or it is a different compilation.


I would place it into **version** command of my program.

This is what I have now.
**Compilation ID** is where I would like to show the identifier.

```
     registerCommand("version", "Show version", { 
writeln("Compilation date: " ~ __DATE__ ~ " " ~ __TIME__ ~ "\n 
Compilation ID: "); });
```





More information about the Digitalmars-d-learn mailing list