[cmake-developers] Apple tests for target_link_libraries failing

Stephen Kelly steveire at gmail.com
Wed Oct 12 10:30:53 EDT 2011


Brad King wrote:

> On 10/12/2011 2:22 AM, Stephen Kelly wrote:
>> using set(CMAKE_LINK_INTERFACE_LIBRARIES "") should be the same as using
>>
>> target_link_libraries(libA LINK_INTERFACE_LIBRARIES "")
>>
>> for each library.
> 
> It is.  The example under discussion has the same behavior even if you
> explicitly set it on each target.

<snip>

> The behavior we are seeing in the test on Apple can be changed to the
> expected behavior by adding
> 
>   SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 0)
> 
> to the CMakeLists.txt file.  However, I don't remember the details of why
> I had to add that to Darwin.cmake in the first place.  Hopefully there is
> a better fix for the original problem.

Ok, knowing why it fails on APPLE is good enough for me for now.

The tests can be enabled on APPLE again later, I've flipped the if condition 
so we can see why it fails on some non-APPLE platforms too. 

I already grepped for CMAKE_LINK_DEPENDENT_LIBRARY_FILES and it seems to not 
appear anywhere else but Darwin.cmake. I remember the tests failing on 
freebsd and some windows too, so if you have any idea why that might be, I'd 
be interested to know.

Thanks,

Steve.





More information about the cmake-developers mailing list