[CMake] add_custom_command doesn't automatically recognize target name created with add_library?

Thomas Sondergaard ts at medical-insight.com
Sat Sep 25 04:57:11 EDT 2010


The documentation for cmake-2.8 states:

In CMake 2.6 and above add_custom_command automatically recognizes a 
target name in its COMMAND and DEPENDS options and computes the target 
location. Therefore this property is not needed for creating custom 
commands.

This doesn't seem to work for me with targets create with 
add_library(..). Is that a bug? I'm working around it by using 
get_target_property(... LOCATION).

Regards,

Thomas Sondergaard



More information about the CMake mailing list