www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How do you use a non-dmd compiler within dub as default compiler?

reply Jamal <jamalsmith95.bc gmail.com> writes:
I made this little sdl2 game and written in D, and the project 
was initialized with dub.

When in the project directory and I type:

$ dub

It fetches all the dependencies and compiles with dmd.

So, what do I chance so that instead it compiles with ldc2 or 
even gdc for that matter?
May 15 2016
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 16/05/2016 12:38 AM, Jamal wrote:
 I made this little sdl2 game and written in D, and the project was
 initialized with dub.

 When in the project directory and I type:

 $ dub

 It fetches all the dependencies and compiles with dmd.

 So, what do I chance so that instead it compiles with ldc2 or even gdc
 for that matter?
Assuming ldc and gdc are installed: $ dub --compiler=ldc2 $ dub --compiler=gdc
May 15 2016
parent Jamal <jamalsmith95.bc gmail.com> writes:
On Sunday, 15 May 2016 at 12:42:05 UTC, rikki cattermole wrote:
 On 16/05/2016 12:38 AM, Jamal wrote:
 I made this little sdl2 game and written in D, and the project 
 was
 initialized with dub.

 When in the project directory and I type:

 $ dub

 It fetches all the dependencies and compiles with dmd.

 So, what do I chance so that instead it compiles with ldc2 or 
 even gdc
 for that matter?
Assuming ldc and gdc are installed: $ dub --compiler=ldc2 $ dub --compiler=gdc
Wow, easy enough. Thank you!
May 15 2016