digitalmars.D.learn - Compiler Specific dub Dependencies
- Jack Stouffer (7/7) Mar 23 2016 Is there any way in dub to specify that a module should only be
- Mike Parker (9/17) Mar 23 2016 I would try using a default configuration with a platform
Is there any way in dub to specify that a module should only be linked and compiled for DMD and not for LDC? I am using the Economic Modeling containers library, and because it uses std.experimental.allocator, it can't be used with LDC through dub. I have coded in such a way with static if's that LDC will still compile without it, but dub will try to compile it anyway because it's in the dependencies JSON dictionary.
Mar 23 2016
On Wednesday, 23 March 2016 at 20:30:04 UTC, Jack Stouffer wrote:Is there any way in dub to specify that a module should only be linked and compiled for DMD and not for LDC? I am using the Economic Modeling containers library, and because it uses std.experimental.allocator, it can't be used with LDC through dub. I have coded in such a way with static if's that LDC will still compile without it, but dub will try to compile it anyway because it's in the dependencies JSON dictionary.I would try using a default configuration with a platform specification. Never done it before, but it would look like this in SDLang: configuration "default-app" { platforms "dmd" } http://code.dlang.org/package-format?lang=sdl#configuration-settings http://code.dlang.org/package-format?lang=json#configuration-settings
Mar 23 2016