[CMake] CMake 2.8.10-rc1 ready for testing!

Rolf Eike Beer eike at sf-mail.de
Fri Oct 5 05:59:22 EDT 2012


Am 2012-10-05 10:54, schrieb Stephen Kelly:
> Rolf Eike Beer wrote:
>
>>>$<TARGET_PROPERTY:prop>   = The value of the property prop on
>>>
>>>the target on which the generator expression is evaluated.
>>
>> Then tell me on which target an include_directories is evaluated on 
>> ;)
>
> Each of them:
>
>
> add_executable(foo ${foo_SRCS})
>
> add_library(bar ${bar_SRCS})
>
> include_directories(
>   "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/some/include>"
> )
>
> add_executable(bat ${bat_SRCS})
> add_library(bag ${bag_SRCS})
>
> The expression will be evaluated for each target, the TYPE will be 
> checked,
> and the include directory added or not.

So even if include_directories() sets this for the directory it will 
only be evaluated when it comes to the target? So different targets in 
the same directory will get different include sets? Nice. Should 
probably be documented more obviously.

Eike


More information about the CMake mailing list