How do you declare manifest constants?

Andrey Zherikov andrey.zherikov at gmail.com
Thu Nov 4 16:43:24 UTC 2021


I want to embed some info from build system - version info, for 
example. I can easily do this with C++ compiler by 
`-DVERSION="1.2.3"` but there is no such an option in dmd. So I'm 
wondering how do people workaround this?
I see only one way: generate a file and add it to the build (file 
might be `.d` source or something included by import expression).


More information about the Digitalmars-d-learn mailing list