Oh Dear
Daniel Keep
daniel.keep.lists at gmail.com
Sun Jul 12 23:10:57 PDT 2009
Adam D. Ruppe wrote:
> (stuff)
Urgh. I *hate* programs that screw with my PATH.
Personally, I've found that the simplest way to solve the multiple
compiler problem is to just shove them all in different directories.
AFAIK, dmd works just fine with relative directories, so it's not like
you HAVE to have the compiler on the PATH.
For example, my system has DMD 1.035 + Tango 99.somethingorother as the
"default" compiler (it's the one on PATH). It's in
\bin\dmd\dmd-default. Then I have the following other directories in
\bin\dmd:
* dmd-1.035
* dmd-1.042-tango
* dmd-1.046-tango
* dmd-2.023
* dmd-2.025
* dmd-2.026
* dmd-2.028
* dmd-2.029
* dmd-2.030
* dmd-custom (was playing around with compiler patches)
* tango-trunk
(Odd that I have so many 2.x compilers, and yet I don't use them... :P)
Compiling with a particular version is pretty easy; instead of typing
'dmd BLAH', I use '\bin\dmd\dmd-x.yyy\bin\dmd BLAH'. I also have
rebuild set up to have most of these available as separate compilers.
So, for example, when I was testing a project with 1.046+Tango trunk, I
went from building like so:
> dsss build
to this:
> dsss build -dc=tango-trunk
The only time this system doesn't work is building Tango which doesn't
provide any way to override which compiler gets used. But then I solve
that with a batch file that just shoves the appropriate compiler on to
the front of the PATH.
Incidentally, thanks for making DMD work like this, Walter. I have a
big, fairly important project that has its own private copy of the
entire toolchain so it's compiler version is stable. Absolutely
indispensable. :D
More information about the Digitalmars-d
mailing list