summaryrefslogtreecommitdiffstats
path: root/Help/command/target_sources.rst
Commit message (Collapse)AuthorAgeFilesLines
* cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-021-4/+1
| | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* Ninja: Allow compilation before generation of dependencies' private sourcesMartin Duffy2023-09-201-0/+2
| | | | | | | | | | This requires knowing when a generated header is public, which we can model using file sets. Add policy CMP0154 to treat generated sources as private by default in targets with file sets. Generated public headers can be specified in public file sets. Fixes: #24959 Issue: #15555
* cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesetsBen Boeckel2023-05-311-26/+6
| | | | | There's no backing implementation for header units anyways, so just remove it for now.
* Help: Add _See Also_ sections to related CMake commandsAlex Turbov2022-11-091-0/+14
|
* Help: Link from usage requirement commands to detailed explanationHinell2022-09-161-4/+4
| | | | | | | Augment vague mentions of "Transitive Usage Requirements" with links to a detailed explanation. Fixes: #23799
* Help: Fix formatting of CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API notesBrad King2022-08-091-4/+4
|
* Merge topic 'doc-example-target-sources'Brad King2022-07-201-2/+2
|\ | | | | | | | | | | | | c7c5a50b97 Help: Add missing PRIVATE keyword to target_sources() example Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7490
| * Help: Add missing PRIVATE keyword to target_sources() exampleCraig Scott2022-07-201-2/+2
| | | | | | Fixes: #23746
* | cmTargetSourcesCommand: allow `INTERFACE` C++ modules when importedBen Boeckel2022-07-061-2/+2
| | | | | | | | | | `PUBLIC` filesets become `INTERFACE` upon installation. Allow `INTERFACE` scopes for C++ modules when the target is imported.
* | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-15/+62
|/ | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* FILE_SET: Forbid adding header sets to Apple FRAMEWORK librariesKyle Edwards2022-04-071-1/+1
| | | | | | | | The feature needs a specialized implementation to place headers in the right place inside frameworks. To avoid silently doing the wrong thing, make this case an error for the 3.23 series. Issue: #23386
* Help: Reorganise FILE_SETS and related propertiesCraig Scott2022-03-051-55/+41
| | | | | | | | | | | | Reduce duplication and make the docs for target_sources() focus on the functionality rather than the properties it modifies. The properties are a lower level quantity, so put the relevant details for them in the property documentation. The target_sources() command only needs to reference the properties, not reproduce the property documentation. Improve the cross-referencing between the HEADER_... property docs. This helps build the mental picture of how they relate to each other.
* Merge topic 'file-set-name-requirements' into release-3.23Brad King2022-03-041-1/+2
|\ | | | | | | | | | | | | | | b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7037
| * target_sources(): Enforce stricter requirements for FILE_SET nameKyle Edwards2022-03-031-1/+2
| | | | | | | | Fixes: #23286
* | target_sources(): Process multiple FILE_SET arguments per blockKyle Edwards2022-03-031-2/+3
|/ | | | Fixes: #23287
* target_sources(): Prohibit FILE_SET on custom targetsKyle Edwards2022-02-281-1/+2
| | | | Fixes: #23262
* Help: Fix target_sources FILE_SET signature summaryBrad King2021-11-051-2/+2
| | | | The `FILE_SET <set>` argument is required to activate this signature.
* Help: Add versionadded markup to target_sources FILE_SET featureBrad King2021-11-051-0/+5
| | | | | | This was accidentally left out of commit 4b0ee4e338 (Help: Add documentation for target_sources(FILE_SET) and associated properties, 2021-07-02).
* Help: Clarify target_sources path conversion w.r.t generator expressionsArcturus Arcturus2021-11-041-18/+31
| | | | | | With some of the content expanded, reorder a few paragraphs and tweak some of the wording to improve the flow. Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* Help: Add documentation for target_sources(FILE_SET) and associated propertiesKyle Edwards2021-10-271-0/+102
|
* Help: Replace some `versionadded` directives with `versionchanged`Nikita Nemkin2020-11-121-1/+1
| | | | | | | | `.. versionchanged` directive might be more appropriate when documentation refers to previous CMake version, old behavior or a policy, and there's no new parameter or a variable involved. Issue: #19715
* Help: Add `.. versionadded` directives to commands documentationNikita Nemkin2020-11-091-8/+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
* target_sources: Support custom targetsAsit Dhal2020-10-241-2/+4
| | | | Fixes: #21034
* Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopesBrad King2020-07-311-6/+8
|
* Help: Add Sphinx 'versionadded' directives to each top-level documentKitware Robot2020-07-061-0/+2
| | | | | | | Run the `Utilities/Sphinx/update_versions.py` script to add initial markup to every top-level document and find module. Issue: #19715
* Help: Apply syntax highlighting to project commandsJoachim Wuttke (o)2018-10-251-2/+2
| | | | | | * Replace most "::" by ".. code-block:: cmake" * Header sentence in imperative voice, detailed command description in present tense.
* target_sources: Interpret relative paths as relative to the calling directoryPatrick Stotko2018-06-181-1/+6
| | | | | | | | | | Previously the command considered non-absolute source file paths relative to the associated target on the LHS. This causes problems in incremental builds where files are added from subdirectories and forces users to workaround by manually converting to absolute paths. Change this to enable more intuitive usage by projects. Fixes #17981
* Teach target_* commands to set INTERFACE properties of IMPORTED targetsDeniz Bahadir2017-10-261-3/+4
| | | | | | | | | | | 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
* Allow export of targets with INTERFACE_SOURCES.Stephen Kelly2015-02-101-4/+0
| | | | | | Use the same rules for paths in source and binary dirs in installed INTERFACE_SOURCES as are used for INTERFACE_INCLUDE_DIRECTORIES.
* Help: Document the export limitation of INTERFACE_SOURCES.Stephen Kelly2014-11-291-0/+4
|
* Help: Fix broken cross-references reported by 'nitpicky' optionBrad King2014-11-071-1/+1
| | | | | Enable the Sphinx 'nitpicky' option and fix the resulting warnings about dangling references.
* target_sources: New command to add sources to target.Stephen Kelly2014-04-021-0/+28