<div class="gmail_quote">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 class="im">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><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>
Best,<br>Vittorio<br><br></div></div>