Stephen Kelly wrote: >> Do the new tcd() and tid() work for them, at least for the impl >> properties (COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES)? > > I would expect so. cmTargetPropCommandBase is not restrictive at all on > the types of targets it expects (though maybe it should be... ?). It makes > sense to allow the use of object libraries with those commands. I can > maybe investigate tomorrow.
I've added a whitelist for target types for those commands. I noticed that add_custom_target(check ALL COMMAND ${CMAKE_COMMAND} -E echo check ) target_link_libraries(check somelib) works. That should probably be an error, but making it one requires a policy and can be deferred. I also looked into the generator expressions which deal with targets, and considered changing TARGET_PROPERTY, LINKED, and TARGET_DEFINED to not consider utility targets as targets. TARGET_FILE and friends already errors on utility and UNKNOWN_LIBRARY targets. I think it might make sense to handle them particularly in LINKED, but I notice set_property and set_target_properties also work fine with them (should that be changed too?), so I don't know if TARGET_PROPERTY should be changed too. If it is, then it makes sense to change TARGET_DEFINED to consider utilities to not be targets, as that expression is most usefully used with TARGET_PROPERTY. Is there a real need to allow things like add_custom_target(check ALL COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:check,message> ) set_property(TARGET check PROPERTY message Hello) ? Thanks, Steve. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers