[cmake-developers] Apple tests for target_link_libraries failing

David Cole david.cole at kitware.com
Wed Oct 12 10:38:01 EDT 2011


On Wed, Oct 12, 2011 at 10:30 AM, Stephen Kelly <steveire at gmail.com> wrote:
> 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.
>
>
> --
>
> 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
>

$ git grep CMAKE_LINK_DEPENDENT_LIBRARY_FILES
ChangeLog.txt:        CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean.
Modules/Platform/Darwin.cmake:SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
Source/cmComputeLinkInformation.cxx:
if(this->Makefile->IsOn("CMAKE_LINK_DEPENDENT_LIBRARY_FILES"))
Source/cmDocumentVariables.cxx:
cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_FILES",

The important occurrence would seem to be the one in
Source/cmComputeLinkInformation.cxx...



More information about the cmake-developers mailing list