[CMake] Check if a target has been added

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jul 8 16:01:37 EDT 2008


On Tuesday 08 July 2008, Félix C. Morency wrote:
> Hi,
>
> I posted a message yesterday and found out that the method wasn't quite
> effective. If there any way of checking if a target has already been added
> to the build chain (resetting it at each configure) ? I have lots of
> projects depending on the same target and this produces makefile warnings
> and VS. annoying popups.

You could try to get a target property, e.g. LOCATION from the target you are 
interested in, and see what you get. 
(this may behave differently in cmake 2.4 and 2.6)

Alex


More information about the CMake mailing list