On 11/01/2013 08:49 AM, Brad King wrote: > On 11/01/2013 07:32 AM, Stephen Kelly wrote: >> add_library(foo SHARED foo.cpp) >> add_library(bar SHARED foo.cpp) >> # target_link_libraries(foo bar) >> set_property(TARGET foo PROPERTY LINK_LIBRARIES bar) >> file(GENERATE OUTPUT outputfile >> CONTENT "$<TARGET_PROPERTY:foo,INTERFACE_LINK_LIBRARIES>\n") >> # Expect outputfile to contain 'bar', but it does not.
Actually, why would we expect 'bar' when setting LINK_LIBRARIES directly? Without the old plain tll() calls I see no reason to expect the link interface to be the link implementation. The link implementation fallback is only for compatibility with the long-standing tll plain signature behavior. If a project sets link information by other means then it takes responsibility for setting the link interface too. > Perhaps the implementation of cmTarget::GetProperty can > special-case INTERFACE_LINK_LIBRARIES to return LINK_LIBRARIES > if only the plain tll signature was used. On second thought, this is a bad idea because it could trigger in a get_property call or something earlier than the last tll call. So yes, hacking the generator expression node for the fallback is probably the right fix. Please also work on the test cases. Thanks, -Brad -- 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
