[cmake-developers] [CMake 0014640]: PRIVATE linking with target_link_libraries propagates "usage requirements" for static libraries
Mantis Bug Tracker
mantis at public.kitware.com
Mon Dec 9 08:59:50 EST 2013
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14640
======================================================================
Reported By: Arunmozhi
Assigned To:
======================================================================
Project: CMake
Issue ID: 14640
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-12-09 08:59 EST
Last Modified: 2013-12-09 08:59 EST
======================================================================
Summary: PRIVATE linking with target_link_libraries
propagates "usage requirements" for static libraries
Description:
I have projects in the structure shown below
module (EXECUTABLE)
|
\-- submodule (STATIC_LIBRARY)
|
\-- subsubmodule (STATIC_LIBRARY)
'submodule' links with 'subsubmodule' using PRIVATE linking as below
target_link_libraries(submodule PRIVATE subsubmodule)
'module' links with 'submodule'. It is expected that the 'module' does not get
the public include directories of 'subsubmod'. However we see this happening in
cmake 2.8.12.
It is understood that the libraries linked with 'subsubmodule' are propagated to
'module' since 'subsubmodule' and 'submodule' are STATIC libraries. However this
does not apply to the INCLUDE directories and COMPILE definitions.
We also note that for SHARED libraries, the PRIVATE linking works fine.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-12-09 08:59 Arunmozhi New Issue
2013-12-09 08:59 Arunmozhi File Added: example.tar
======================================================================
More information about the cmake-developers
mailing list