[cmake-developers] <TARGET> availability

Vittorio Giovara vittorio.giovara at gmail.com
Thu Mar 21 08:18:20 EDT 2013


On Thu, Mar 21, 2013 at 1:11 PM, Vittorio Giovara <
vittorio.giovara at gmail.com> wrote:

>
> On Thu, Mar 21, 2013 at 11:06 AM, Vittorio Giovara <
> vittorio.giovara at gmail.com> wrote:
>
>> 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.
>>
>
> Apologies, I missed the fact that <TARGET> should also contain the output
> path.
> Please find attached an updated version of the patch, using a similar
> procedure as found in cmMakefileExectuableTargetGenerator.
>
> Do you know if this patch can still make it to CMake 2.8.11 or is it too
> late?
>

Now with correct commit information (sorry for the spam).
Vittorio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130321/922c7e17/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-set-Target-during-rule-setup-so-that-TARGET-is-avail.patch
Type: application/octet-stream
Size: 1205 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130321/922c7e17/attachment-0002.obj>


More information about the cmake-developers mailing list