[CMake] set_property() scope qualifier question...

Philip Lowman philip at yhbt.com
Mon Jun 1 22:53:27 EDT 2009


On Mon, Jun 1, 2009 at 2:12 PM, Sean Chittenden <sean at chittenden.org> wrote:

> Ideally I'd like to see cmake(1) be able to issue the following commands:
>>>
>>> // Create foo_test
>>> gcc -o foo.o -c foo.c -DTESTING
>>> gcc -o foo_test foo.o
>>>
>>> // Create bar_test
>>> gcc -o foo.o -c foo.c
>>> gcc -o bar.o -c bar.c -DTESTING
>>> gcc -o bar_test foo.o bar.o
>>>
>>>
>>> That help clarify?  set_target_property() still defines TESTING for both
>>> foo.c and bar.c and the bar_test case would break.  Ideally I'd like to set
>>> a source property in the bar_test case, but don't know how to do that.  I
>>> thought the scope property would do it.  Can I somehow finagle this using an
>>> if() ?
>>>
>>
>> Not that I know of.
>>
>
> Drat.  Well...  guess this is a feature request then: being able to set
> properties on a per source and per target (or test).  :~]
>

File the feature request in the CMake bugtracker if you like.
http://public.kitware.com/Bug/my_view_page.php

I think what you're really asking for is the ability to set the
COMPILE_FLAGS source file property on a per-target basis.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090601/1571efea/attachment.htm>


More information about the CMake mailing list