MantisBT - CMake
View Issue Details
0015601CMakeCMakepublic2015-06-03 04:372016-06-10 14:31
Valerii Kanunik 
Kitware Robot 
normalfeaturehave not tried
closedmoved 
 
 
0015601: Add target linker commands
Alongside with all target_* commands (target_compile_definitions, target_compile_features, target_compile_options, target_include_directories and target_link_libraries) are missing command to add linker flag to exact target.

It would be grate add one or several commands which, for instance, on linux appends to linking command -Xlinker arguments, -T sctripts etc.
No tags attached.
Issue History
2015-06-03 04:37Valerii KanunikNew Issue
2015-06-03 08:26Brad KingNote Added: 0038877
2015-06-10 13:12nonameNote Added: 0038903
2015-06-10 13:29nonameNote Edited: 0038903bug_revision_view_page.php?bugnote_id=38903#r1806
2016-06-10 14:29Kitware RobotNote Added: 0042789
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
(0038877)
Brad King   
2015-06-03 08:26   
For reference, discussion here:

 push of LinkOptionsCommand topic branch
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9203 [^]

covers the possibility of a LINK_OPTIONS build property, INTERFACE_LINK_OPTIONS usage requirement, and target_link_options command to set them.

Currently one can use target_link_libraries PRIVATE mode to add link flags to a specific target.
(0038903)
noname   
2015-06-10 13:12   
(edited on: 2015-06-10 13:29)
I want this feature too.
I need transitive link flags.
If I remember correctly, the target_link_libraries trick didn't work for Ninja. (I didn't check every generator.)

(0042789)
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.