[cmake-developers] <TARGET> availability

Vittorio Giovara vittorio.giovara at gmail.com
Thu Mar 21 06:06:02 EDT 2013


On Wed, Mar 20, 2013 at 2:05 PM, Brad King <brad.king at kitware.com> wrote:

> On 3/20/2013 4:52 AM, Vittorio Giovara wrote:
> > is it possible to use the <TARGET> variable during the COMPILE_OBJECT
> phase?
> > I see it only working on EXECUTABLE and LIBRARY steps but a few
> > languages would benefit from having <TARGET> available during
> > COMPILE_OBJECT as well.
> > Is there any way to make it work with the current cmake version?
>
> It would take some changes to the C++ code.  Look here:
>
>
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v2.8.10.2#l658
>
> If one sets vars.Target next to where vars.TargetPDB is
> set then the replacement should occur.  If you get it working
> please respond back here with a patch.
>

Yup, thanks to your tip, I got it working as expected.
Please find the patch attached, I'll be glad if you could apply it.
I'm fine with BSD licensing.
Best,
Vittorio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130321/a19135f4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-set-the-target-name-during-rule-setup-so-that-you-ca.patch
Type: application/octet-stream
Size: 870 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130321/a19135f4/attachment-0002.obj>


More information about the cmake-developers mailing list