Gonzalo Garramuño wrote:

I was wondering what's the best way to determine if a target exists.

I wanted to modify a target's properties but depending on the type of build, it may not always exist.


You could do this:

GET_TARGET_PROPERTY(target_location target_name LOCATION)

target_location will equal NOT-FOUND if target_name does not exist or the location of the target otherwise.
--
Daniel
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to