Re: Setting path to MSVC compiler with cctask
"Paul Richards" <[email protected]> Wed, 23 Apr 2008 12:12:10 +0100
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <a1138db30804230412i60f53658sa662b847bc0169ac__1881.76505403153$1208949271$gmane$org@mail.gmail.com> |
2008/4/23 Steve Loughran <[email protected]>: > Paul Richards wrote: > > > Hi, > > I'm trying to use cpptasks-1.0b5 with Ant 1.7.0 on a C++ a project > > that must be built with MSVC in both 32-bit and 64-bit flavours. With > > MSVC this means we must build the project with two different versions > > of "cl.exe". > > > > I can't put both on my PATH, and so I'd like to specify in my Ant > > build script the correct version of the cl.exe compiler for cctask to > > use each time. > > > > > > Attempt #1 (failure): > > > > From what I can tell I can't set the environment on the fly in Ant. > > For example I tried the following code before my cc task, and this > > didn't work. > > <property environment="env"/> > > <property name="env.Path" value="${env.Path};C:\Program Files > > (x86)\Microsoft Visual Studio 8\VC\bin"/> > > The cc task fails to find cl.exe if I try this. > > > > > > > > Is there any way to set env variables inside the <cc> task? > The cc task does allow me to set env blocks but they are only used to set the environment of the newly spawned cl.exe, and aren't used to help find cl.exe itself. So the cc task's own env blocks don't help me. -- Paul Richards ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone