MantisBT - CMake
View Issue Details
0016110CMakeCMakepublic2016-05-25 18:462016-06-10 14:31
Roman Popov 
Kitware Robot 
normalfeaturealways
closedmoved 
 
 
0016110: LINK_LIBRARIES contains both libraries and flags, separate variables required
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>")
No tags attached.
Issue History
2016-05-25 18:46Roman PopovNew Issue
2016-05-25 18:48Roman PopovNote Added: 0041095
2016-06-10 14:29Kitware RobotNote Added: 0043007
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0041095)
Roman Popov   
2016-05-25 18:48   
Discussion about topic:
http://stackoverflow.com/questions/37368434/cmake-custom-link-executable-command-how-to-extract-linker-options [^]
(0043007)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.