midrare
midrare

Reputation: 2774

D: Define custom version identifier for conditional compilation

The D documentation talks about predefined version identifiers, but not how to define your own version. How do I do it?

Since this feature is supposed to be the D counterpart to C/C++'s #if/#ifdef, I doubt they would lock us to only the predifined versions.

Upvotes: 1

Views: 85

Answers (1)

Adam D. Ruppe
Adam D. Ruppe

Reputation: 25605

You can pass a version to the compiler when building with the -version=whatever switch.

Upvotes: 4

Related Questions