On Wednesday, 16 September 2020 at 17:53:31 UTC, Vladimirs
Nordholm wrote:
Hello.
I wonder if there is a better way to compile something if the
current operating system is _not_ a specific platform.
For example, I only want some code to compile if the operating
system is not Windows. Currently I do this:
version (Windows)
{
}
else
{
// ... my code
}
Is there a neater version of this, like `!version (Windows) {
/+ ... my code +/ }` ?
Not what you may want, but a dub solution is available.
"excludeSourceFiles-windows" : ["source/someunixcode.d"]