add_link_options.rst 863 B

1234567891011121314151617181920212223242526
  1. add_link_options
  2. ----------------
  3. Adds options to the link of targets.
  4. ::
  5. add_link_options(<option> ...)
  6. Adds options to the link step for targets in the current directory and below
  7. that are added after this command is invoked. See documentation of the
  8. :prop_dir:`directory <LINK_OPTIONS>` and
  9. :prop_tgt:`target <LINK_OPTIONS>` ``LINK_OPTIONS`` properties.
  10. This command can be used to add any options, but alternative commands
  11. exist to add libraries (:command:`target_link_libraries` or
  12. :command:`link_libraries`).
  13. Arguments to ``add_link_options`` may use "generator expressions" with
  14. the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
  15. manual for available expressions. See the :manual:`cmake-buildsystem(7)`
  16. manual for more on defining buildsystem properties.
  17. .. include:: LINK_OPTIONS_LINKER.txt
  18. .. include:: OPTIONS_SHELL.txt