Define enum value at compile time via compiler argument?

Thomas Mader thomas.mader at gmail.com
Mon Dec 25 16:13:48 UTC 2017


Hello,

I would like to set the path to a directory at compile time but 
it doesn't seem to be possible yet.

I tried it with a -version=CustomPath argument and inside the 
version statement in the code I tried to read the value from the 
environment. Sadly this doesn't work because getenv can not be 
interpreted at compile time because it has no available source.

Now my question is if this is somehow possible and I just don't 
see it or would it be possible to add that somehow?

Thanks in advance.

Thomas



More information about the Digitalmars-d-learn mailing list