Another option for this was suggested here:
https://forum.dlang.org/post/qbvgboihhwcuqglyg...@forum.dlang.org
On Wednesday, 12 February 2020 at 09:28:15 UTC, Simen Kjærås
wrote:
So, you could have a file called 'versions' containing this:
# Setting 'Compress' version
-version=Compress
# Optio
On Tue, Apr 12, 2022 at 10:07:15AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 4/11/22 01:57, KytoDragon wrote:
>
> > Is there any way to import version specifiers from a separate file?
>
> Have you tried mixing in the versions? Have one file with the versions
> in it:
>
> // file:
On 4/11/22 01:57, KytoDragon wrote:
> Is there any way to import
> version specifiers from a separate file?
Have you tried mixing in the versions? Have one file with the versions
in it:
// file: 'versions'
version = x;
Then mix it in:
mixin (import ("versions"));
version (x) { /* .
On Monday, 11 April 2022 at 08:57:12 UTC, KytoDragon wrote:
[...]
Sadly this results in an identifier conflict, as the version
set in config.d does not seem to affect library.d. Is there any
way to import version specifiers from a separate file? I don't
want to pollute the users build files (d
I am currently maintaining a port of a c++ library that uses
conditional compilation to integrate into the users program. e.g.:
config.h (edited by the user of the library)
```
#define USE_MY_ASSERT
void MY_ASSERT(bool expr) {...}
```
library.c
```
include "config.h"
#ifndef USE_MY_ASSERT
v