View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016110CMakeCMakepublic2016-05-25 18:462016-06-10 14:31
ReporterRoman Popov 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0016110: LINK_LIBRARIES contains both libraries and flags, separate variables required
DescriptionFor 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>")
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0041095)
Roman Popov (reporter)
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 (administrator)
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.

 Issue History
Date Modified Username Field Change
2016-05-25 18:46 Roman Popov New Issue
2016-05-25 18:48 Roman Popov Note Added: 0041095
2016-06-10 14:29 Kitware Robot Note Added: 0043007
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team