On Wednesday, 31 July 2019 at 17:29:58 UTC, Andrey Zherikov wrote:
I want my program to add some directories into module lookup
process (like adding -I dmd options). List of directories is
known at compile time but the choice of what exact directories
to add depends on `-version` parameter.
Is there a way to achieve this in code?
I can actually do this by creating scripts like
'build-version1', 'build-version2' but I'm looking for a way to
avoid this.
Your best bet is actually not relying on CTFE since IO is very
restricted at CTFE in D.
Ex. you can only import files that are specified by you.
The best thing you can do is have a file that lists every file
you need to be able to read at CTFE.