summaryrefslogtreecommitdiffstats
path: root/Help/command/target_link_libraries.rst
Commit message (Collapse)AuthorAgeFilesLines
* Help: Add _See Also_ sections to related CMake commandsAlex Turbov2022-11-091-0/+12
|
* Help: Use monospaced font for a genex name in a section titleAlex Turbov2022-11-091-2/+2
|
* Help: Link from usage requirement commands to detailed explanationHinell2022-09-161-1/+3
| | | | | | | Augment vague mentions of "Transitive Usage Requirements" with links to a detailed explanation. Fixes: #23799
* Help: Fix trivial typoCraig Scott2021-07-181-1/+1
|
* target_link_libraries: Place $<TARGET_OBJECTS> before librariesBrad King2021-05-291-0/+85
| | | | | | | | | Linkers always use object files explicitly specified on the command line regardless of where they appear. Move them to the front of the list of linked libraries in so that symbols required by the object files can be resolved by any library. Issue: #22149
* Help: Add `.. versionadded` directives to commands documentationNikita Nemkin2020-11-091-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change ony concerns directives that appear in the document body. The guidelines for inserting version directives: * Baseline version is CMake 3.0, i.e. directives start at 3.1. * Always use `.. versionadded::` directive, avoid ad-hoc version references. Exception: policy pages. * For new command signatures, put `versionadded` on a separate line after the signature. * For a group of new signatures in a new document section, a single version note at the beginning of the section is sufficient. * For new options, put `versionadded` on a separate line before option description. * If all the option descriptions in the list are short one-liners, it's fine to put `versionadded` on the same line as the description. * If multiple option descriptions in close proximity would have the same ..versionadded directive, consider adding a single directive after the list, mentioning all added options. * For compact value lists and sub-option lists, put a single `versionadded` directive after the list mentioning all additions. * When a change is described in a single paragraph, put `versionadded` into that paragraph. * When only part of the paragraph has changed, separate the changed part if it doesn't break the flow. Otherwise, write a follow-up clarification paragraph and apply version directive to that. * When multiple version directives are close by, order earlier additions before later additions. * Indent related lists and code blocks to include them in the scope of `versionadded` directive. Issue: #19715
* Help: Improve documentation formatingBartosz Kosiorek2019-04-041-1/+1
|
* Merge topic 'no-smiley'Brad King2018-10-291-1/+1
|\ | | | | | | | | | | | | 24fa04018c Help: Spell out ";-list" as "semicolon-separated list" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2528
| * Help: Spell out ";-list" as "semicolon-separated list"Joachim Wuttke (o)2018-10-251-1/+1
| |
* | Help: Apply syntax highlighting to project commandsJoachim Wuttke (o)2018-10-251-5/+7
|/ | | | | | * Replace most "::" by ".. code-block:: cmake" * Header sentence in imperative voice, detailed command description in present tense.
* Help: Clarify command-line encoding of target_link_libraries itemsBrad King2018-10-181-0/+12
| | | | | | | | Items that have full paths will be quoted automatically. Other items are treated as command-line string fragments and get no automatic escaping. Document the behavior for each item kind. Fixes: #18467
* Help: Clarify target_link_libraries keywords and generator expressionsBrad King2018-10-081-6/+18
| | | | | | | | | | The `optimized` and `debug` keyword items are meaningful only to the `target_link_libraries` command and have no meaning when produced by a generator expression. State this explicitly. Also recommend use of a quoted argument when the genex itself may contain a semicolon. Fixes: #18424
* target_link_libraries: Allow use with targets in other directoriesBrad King2018-09-121-4/+7
| | | | | | | | | | | | | | | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Targets named on the RHS will need to be looked up during generation in the scope of the call site rather than the scope of the LHS target. Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties to specify target names that need to be looked up in a directory other than that containing the target on which the property is set. Add minimal documentation of the syntax to help users that encounter it. Unfortunately CMake previously did allow such calls in the case that only `INTERFACE` libraries are specified, but those libraries would be looked up in the target's directory rather than the caller's. Add policy `CMP0079` to enable the new behavior with new lookup scope in a compatible way. Fixes: #17943
* Merge topic 'revert-subdirectory-linking'Brad King2018-07-051-1/+1
|\ | | | | | | | | | | | | 0d7114987c Revert "target_link_libraries: Allow use with targets in other directories" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2191
| * Revert "target_link_libraries: Allow use with targets in other directories"Brad King2018-07-031-1/+1
| | | | | | | | | | | | | | | | | | Revert commit v3.12.0-rc1~82^2 (target_link_libraries: Allow use with targets in other directories, 2018-05-11). The RHS target scoping and visibility rules are not clear and will need further investigation before the feature can be added. Issue: #17943
* | LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-1/+2
|/ | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* target_link_libraries: Allow use with targets in other directoriesPatrick Stotko2018-05-151-1/+1
| | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Fixes: #17943
* Help: Document linking behavior of OBJECT librariesBrad King2018-03-011-0/+64
| | | | | Inspired-by: Deniz Bahadir <dbahadir@benocs.com> Issue: #14778
* Teach target_* commands to set INTERFACE properties of IMPORTED targetsDeniz Bahadir2017-10-261-1/+2
| | | | | | | | | | | Now, several `INTERFACE_*` properties can be set on `IMPORTED` targets, not only via `set_property` and `set_target_properties` but also via `target_compile_definitions`, `target_compile_features`, `target_compile_options`, `target_include_directories`, `target_sources` and `target_link_libraries`. Fixes: #15689 Issue: #17197
* VS: Treat libraries ending in `.targets` as msbuild importsSoji Yamakawa2016-11-091-0/+5
| | | | | | | Generate `<Import Project="..." .../>` to import the `.targets` files into `.vcxproj` files. Closes: #16340
* Help: Clarify treatment of link flags in target_link_librariesJohn Beard2016-10-031-0/+6
|
* Link libraries by full path even in implicit directoriesBrad King2015-04-091-5/+11
| | | | | | | | | | | | | | | | | | | | | | When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.
* Help: Revise target_link_libraries command documentationBrad King2015-04-031-84/+124
| | | | | | Organize the documentation into subsections to separate the signatures. Refactor the discussion of allowed link items into bullet points and expand into more detail on each.
* Help: Place relocatable package notes in their own subsectionsBrad King2015-04-031-3/+6
| | | | | | | These notes apply only for the use case of creating a package for redistribution on machines other than that where it is built. Clarify this to readers by placing the discussion in dedicated sections titled accordingly.
* Help: Warn that paths should not be used in INTERFACE_ build properties.Stephen Kelly2014-11-251-0/+3
|
* Help: Clarify target_link_libraries treatment of flags (#15034)Brad King2014-07-281-1/+4
| | | | Explain that link flags should not be used in transitive contexts.
* Help: Mark up the buildsystem commands documentationStephen Kelly2014-02-061-86/+89
| | | | Cross-link to the cmake-buildsystem manual.
* Help: Use ``inline-literals`` to mark generator expressions.Stephen Kelly2014-02-061-1/+1
|
* CMP0022: Update target_link_libraries plain signature documentationBrad King2013-11-031-7/+10
| | | | | | Make the documentation change made by commit ef10b87c (CMP0022: Plain target_link_libraries must populate link interface, 2013-11-02) in the new location for the same documentation.
* target_link_libraries(): Fix code snippet in documentation.Stephen Kelly2013-10-181-1/+2
| | | | The porting script seems to have made a mistake here.
* Help: Factor out cmake-generator-expressions manual pageBrad King2013-10-161-75/+2
| | | | | | | | | Generator expressions are supported in many places and are a distinct concept worthy of their own manual page. The old builtin documentation was previously represented by preprocessor macros to generate it into each place that supports them. Factor out the duplicate content into a dedicated cmake-generator-expressions manual page and reference it from each original location.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-0/+215
Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.