On 11/01/2013 07:32 AM, Stephen Kelly wrote:
> Your commit, and my follow up from today don't pass this test:

In your follow up, you removed my hunk:

-  // Make sure INTERFACE_LINK_LIBRARIES target property exists
-  // if any signature except the plain one was used.  Other
-  // signatures imply awareness of explicit link interfaces.
-  if(this->CurrentProcessingState != ProcessingLinkLibraries &&
-     !this->Target->GetProperty("INTERFACE_LINK_LIBRARIES"))
-    {
-    this->Target->SetProperty("INTERFACE_LINK_LIBRARIES", "");
-    }

What is wrong with it?  The documentation of the tll signatures
besides the plain one says that they set INTERFACE_LINK_LIBRARIES.
Shouldn't it get set to empty if a non-plain signature is used
that doesn't add anything to the interface?

>  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.
> 
> That was a primary motivation for introducing INTERFACE_LINK_LIBRARIES.
> 
> So, I guess we should add something similar to the export logic to the genex 
> TargetPropertyNode. Any comments on that?

I think we should encourage use of the tll keyword signatures
in which case this doesn't matter.  However, we can try to support
this.  Perhaps the implementation of cmTarget::GetProperty can
special-case INTERFACE_LINK_LIBRARIES to return LINK_LIBRARIES
if only the plain tll signature was used.  That will cover both
the export and generator expression cases, no?

-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

Reply via email to