<br><div class="gmail_quote">On Thu, Mar 21, 2013 at 11:06 AM, Vittorio Giovara <span dir="ltr"><<a href="mailto:vittorio.giovara@gmail.com" target="_blank">vittorio.giovara@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div><div class="h5">On Wed, Mar 20, 2013 at 2:05 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 3/20/2013 4:52 AM, Vittorio Giovara wrote:<br>
> is it possible to use the <TARGET> variable during the COMPILE_OBJECT phase?<br>
> I see it only working on EXECUTABLE and LIBRARY steps but a few<br>
> languages would benefit from having <TARGET> available during<br>
> COMPILE_OBJECT as well.<br>
> Is there any way to make it work with the current cmake version?<br>
<br>
</div>It would take some changes to the C++ code.  Look here:<br>
<br>
 <a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v2.8.10.2#l658" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v2.8.10.2#l658</a><br>


<br>
If one sets vars.Target next to where vars.TargetPDB is<br>
set then the replacement should occur.  If you get it working<br>
please respond back here with a patch.<br></blockquote></div></div><div><br>Yup, thanks to your tip, I got it working as expected.<br>Please find the patch attached, I'll be glad if you could apply it.<br>I'm fine with BSD licensing.<br>
</div></div></blockquote></div><br>Apologies, I missed the fact that <TARGET> should also contain the output path.<br>Please find attached an updated version of the patch, using a similar procedure as found in cmMakefileExectuableTargetGenerator.<br>
<br>Do you know if this patch can still make it to CMake 2.8.11 or is it too late?<br>Thanks,<br>Vittorio<br>