[cmake-developers] [CMake 0016110]: LINK_LIBRARIES contains both libraries and flags, separate variables required
Mantis Bug Tracker
mantis at public.kitware.com
Wed May 25 18:46:51 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=16110
======================================================================
Reported By: Roman Popov
Assigned To:
======================================================================
Project: CMake
Issue ID: 16110
Category: CMake
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-05-25 18:46 EDT
Last Modified: 2016-05-25 18:46 EDT
======================================================================
Summary: LINK_LIBRARIES contains both libraries and flags,
separate variables required
Description:
For example, if I write my own link rule:
set(CMAKE_CXX_LINK_EXECUTABLE "echo \" <LINK_LIBRARIES> \" ") LINK_LIBRARIES
will evaluate to :
- flags (like: -rdynamic -Wl,-rpath,rpath1:rpath2 ...)
- static libraries (like: lib1.a -lthreads ...)
- dynamic libraries (like: libdlib.so )
To support new gcc-compatible linking tools (for example Synopsys VCS or
Cadence NCSIM ) flags and libs need to be separated: for example into some new
variables: LINK_LIBRARIES_FLAGS , LINK_LIBRARIES_STATIC, LINK_LIBRARIES_SHARED.
In that case user can simply define new linking rules, for example:
(CMAKE_CXX_LINK_EXECUTABLE "vcs -sysc -LDFLAGS \" <LINK_LIBRARIES_FLAGS> \"
<LINK_LIBRARIES_STATIC> <LINK_LIBRARIES_SHARED> <OBJECTS>")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-05-25 18:46 Roman Popov New Issue
======================================================================
More information about the cmake-developers
mailing list