[cmake-developers] [CMake 0013211]: CMake should not link shared libraries recursively
Mantis Bug Tracker
mantis at public.kitware.com
Thu May 10 21:36:14 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13211
======================================================================
Reported By: thanil
Assigned To:
======================================================================
Project: CMake
Issue ID: 13211
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-05-10 21:36 EDT
Last Modified: 2012-05-10 21:36 EDT
======================================================================
Summary: CMake should not link shared libraries recursively
Description:
If target A depends on a shared library B and B depends on a shared library C,
then CMake will create linker directives to link A to both B and C, when it
should only link A to B. This creates unnecessary dependencies in the case of
shared libraries.
Steps to Reproduce:
Attached file contains example CMake project with an executable A and two shared
libraries B and C.
Once cmake has been run from directory xxx
xxx/CMakeFiles/a.dir/link.txt contains the following line:
/usr/bin/gcc -Wl,-search_paths_first -Wl,-headerpad_max_install_names
CMakeFiles/a.dir/a.c.o -o a b/liblibb.dylib b/c/liblibc.dylib
which shows that A will be linked to C when there is no reason to do so since
these are shared libraries.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-05-10 21:36 thanil New Issue
2012-05-10 21:36 thanil File Added: cmake_link_bug.tar.gz
======================================================================
More information about the cmake-developers
mailing list