On Wed, 2010-07-07 at 16:49 -0400, Brad King wrote:
> On 7/7/2010 7:45 AM, Marcel Loose wrote:
> > My pragmatic question is: is there a different way to check whether
a
> > target has already been defined, or not.
>
> Try this:
>
> get_target_property(mytarget_exists mytarget TYPE)
> if(mytarget_exists)
> message("YES")
> else()
> message("NO")
> endif()
>
> The if(TARGET) mode was added in 2.6.2 to make the
> test more readable.
>
> -Brad
Thanks Brad,
That works like a charm.
Regards,
Marcel Loose.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake