Commit Graph

92 Commits

Author SHA1 Message Date
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
FeRD (Frank Dana)
8cbd6f5754 Help: Fix location of install() note about superseded commands
The note regarding commands superseded by install() somehow wound
up nested under the install(EXPORT) signature, when it has nothing
to do with install(EXPORT). Move it to the top level, immediately
before the Examples section.
2024-03-28 16:59:00 -04:00
Brad King
3a739d4dcb EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate
Some design concerns have been raised after trying the 3.29 release
candidates.  Avoid committing to a stable public interface for now.

Issue: #25767
2024-03-12 14:24:53 -04:00
Robert Maynard
af293ff7c3 Help: Explicitly discourage absolute install destinations
Document some of the problems caused by absolute install destinations.
Encourage use of relative paths.
2024-02-16 09:53:55 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04:00
Brad King
b97350a151 Help: Add more install(TARGETS) examples
Add examples showing per-artifact components and per-configuration
destinations.

Fixes: #25144
2023-08-03 12:49:53 -04:00
Brad King
0827305032 Help: Clarify install(TARGETS) artifact-kind option group ordering
Revise the signature and description to explicitly distinguish the
initial group of artifact options from later groups that apply to
a specific kind.

Issue: #25144
Fixes: #16362
2023-08-03 12:49:53 -04:00
Brad King
7bd6478dd0 Help: Use argument value placeholders consistently in install(TARGETS) 2023-08-03 12:49:53 -04:00
Brad King
ae381e1075 Help: Reorganize install() sections
After switching to the signature directive we no longer need
per-signature sections.  Group all the signatures in one section.  Add a
table of contents since it is no longer redundant with the synopsis.
2023-08-03 12:49:46 -04:00
Brad King
5d15231a67 Help: Revert "improve install() documentation of argument ordering"
Revert commit f09fda97d8 (Help: improve install() documentation of
argument ordering, 2018-01-08, v3.11.0-rc1~126^2).  Although the
example it added is correct, its explanation is misleading.
Revert it to make room for an alternative.

Issue: #25144
Issue: #16362
2023-08-03 10:52:11 -04:00
Brad King
da51e8f59b Help: Cross-reference install command signatures as commands
Replace manual anchors with proper command signature cross-references.
2023-08-02 13:43:53 -04:00
Brad King
7a54bdf0c1 Help: Use signature directive for 'install' command
Replace manual anchors with signature directives.  Indent each
signature's documentation inside its directive.
2023-08-02 13:43:32 -04:00
Brad King
38737e3970 Help: Mention imported config mapping in export() and install() docs
Suggest the `CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>` variable for mapping
configurations of dependent projects to configurations exported by these
commands.

Issue: #25096
2023-07-18 11:11:14 -04:00
Marc Chevrier
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
2023-03-01 12:23:28 +01:00
Ben Boeckel
c36910476a Help: remove links from pages to themselves
At least the top-reference links. Internal `:ref:` usages have been left
intact.
2022-11-18 14:09:32 -05:00
Alex Turbov
c86ec79d07
Help: Use direct refs to genexes instead of `$<GENEX-NAME>` 2022-11-09 23:52:30 +04:00
Brad King
b768a5e23b Help: Disambiguate cmake(1) program modes in Sphinx option references
Define the entry point to each mode as an option for the `cmake`
program, but reference the options for that mode as part of stand-in
`cmake-<mode>` programs.
2022-10-05 15:27:40 -04:00
Brad King
5d76ff6019 Help: Fix formatting of CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API notes 2022-08-09 13:05:34 -04:00
Alex Turbov
04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Brad King
983a5b1a7e Merge topic 'install-destination-docs'
52164be691 Help: Clarify behavior of install(TARGETS) for DLLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7457
2022-07-08 09:05:51 -04:00
Kyle Edwards
52164be691 Help: Clarify behavior of install(TARGETS) for DLLs
Fixes: #23695
2022-07-06 12:03:53 -04:00
Ben Boeckel
fe44cbe9e7 exports: support CXX_MODULES_DIRECTORY
This directory will be used to store build-discovered information about
targets such as the modules provided by the files in the relevant
`FILE_SET` types.

A directory is used because basing the name on a `<FILE_NAME>-*.cmake`
pattern makes it end up being globbed in the configuration-dependent
information mechanism. Since old modules and targets may be around,
unconditionally including them may refer to targets that do not actually
exist.
2022-07-06 10:15:23 -04:00
Ben Boeckel
29118091dc install: support CXX_MODULES_BMI installation bits 2022-07-06 10:15:23 -04:00
Jean-Christophe Fillion-Robin
308b698f5d Help: Make install() example component names more consistent
This commit updates the documentation so that the component examples are
specified using title case to match convention used in both the existing
`Installing Exports` section and in the "Mastering CMake" book.
2022-05-12 10:15:42 -04:00
Eugene Shalygin
7431759ebc Help: Fix typo in install command documentation 2022-04-04 07:38:29 +10:00
Craig Scott
4286b72240 Help: Update install() docs to better reflect preference for file sets
Previously, headers would typically be installed as bare files or
as whole directories. File sets offer a better abstraction and
associate headers with a target, installing them as part of the
target. Add notes and update examples to draw the reader's
attention to the advantages of file sets for headers.
2022-03-08 19:38:56 +11:00
Brad King
79d379fba6 Help: Add versionadded markup to target_sources FILE_SET feature
This was accidentally left out of commit 4b0ee4e338 (Help: Add
documentation for target_sources(FILE_SET) and associated properties,
2021-07-02).
2021-11-05 10:19:10 -04:00
Kyle Edwards
4b0ee4e338 Help: Add documentation for target_sources(FILE_SET) and associated properties 2021-10-27 15:17:23 -04:00
Felix Lelchuk
58d10cf6f1 Alternative symlink-creating mode for file(INSTALL ...)
An new environment variable 'CMAKE_INSTALL_MODE' is introduced,
which can be used to ask CMake to create symbolic links
instead of copying files during a file(INSTALL ...).

The operation is at the file level only, directory trees are
still created using actual directories, not links.

Signed-off-by: Felix Lelchuk <felix.lelchuk@gmx.de>
2021-08-02 19:42:26 +02:00
Craig Scott
24b76eaa93 Help: Improve readability and accuracy of runtime deps-related content
Duplicated textual patterns are factored out to make the text
more readable. The POST_INCLUDE_FILES and POST_EXCLUDE_FILES
were also previously missing from the main syntax block for
install(RUNTIME_DEPENDENCY_SET).
2021-07-04 17:37:29 +10:00
Craig Scott
308e5b30c9 Help: Tighten install(SCRIPT) wording for ALL_COMPONENTS option
In particular, mention the mutually exclusive nature with the
COMPONENT option. Fix the inconsistent way the versionadded
details were added for that text too.
2021-07-03 17:10:09 +10:00
Kyle Edwards
72f2448e82 Help: Add documentation for runtime dependency installation 2021-06-04 15:25:18 -04:00
Brad King
e6bcd5e45a Merge topic 'doc_regex'
0d210b92fa Help: links to CMake regex syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6179
2021-06-03 08:09:34 -04:00
Michael Hirsch
0d210b92fa Help: links to CMake regex syntax 2021-06-02 10:30:21 -04:00
Kyle Edwards
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode 2021-05-31 09:02:45 -04:00
Nils Gladitz
99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
In a per-component installation the generated installation scripts
are invoked once for each component.

Per default custom installation script code added by install(CODE|SCRIPT)
only runs for one specific component in this context.

The new ALL_COMPONENTS option allows custom script code to be run once
for each component being installed.
2021-05-19 19:17:58 +02:00
Josef Angstenberger
7072d83772
Help: Fix typos and spelling in documentation 2021-05-07 17:00:17 +02:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Nikita Nemkin
a19058d7d8 Help: Replace some versionadded directives with versionchanged
`.. 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
2020-11-12 09:44:01 +05:00
Nikita Nemkin
c705279bae Help: Add .. versionadded directives to commands documentation
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
2020-11-09 20:51:57 +05:00
Joachim Wuttke (h)
9a25278f8c Help: advise against CMAKE_INSTALL_PREFIX in install DESTINATION.
as per my uncontradicted post
 https://discourse.cmake.org/t/local-install-vs-install-for-cpack-absolute-vs-relative-path/623/2?u=jwuttke
2020-07-08 15:09:19 +02:00
Brad King
0315d269c2 Help: Reference policy CMP0082 from install() command docs
The policy plays an important role in the behavior of the `install()`
command, so the latter's documentation should mention it.
2020-04-27 07:45:11 -04:00
Kyle Edwards
0f76839bc7 Help: Discourage direct use of cmake_install.cmake
Encourage people to use cmake(1) --install instead.
2020-04-01 11:39:28 -04:00
Brad King
e6344586ee install: Document caveat when EXPORT name matches package name
Fixes: #20427
2020-03-26 09:34:23 -04:00
Joachim Wuttke (o)
22aac6669b Help: install: use bullet lists to sort out target kinds 2020-02-17 11:29:50 -05:00
Joachim Wuttke (o)
79e1d86d2c Help: command install: absolute paths unsupported by CPack
Advise against absolute DESTINATIONs as they are not supported
by CPack installer generators.
2020-02-12 19:40:04 +01:00
Brad King
2fa920c0cd AIX: Create import library for executables with exports
On AIX, plugins meant to be loaded into executables via `dlopen` must be
linked with access to a list of symbols exported from the executable in
order to use them (when not using runtime linking).  The AIX linker
supports specifying this list as an "import file" passed on the command
line either via the `-bI:...` option or (with a leading `#! .` line) as
a normal input file like any other library file.

The linker import file plays the same role on AIX as import libraries do
on Windows.  Teach CMake to enable its import library abstraction on AIX
for executables with the `ENABLE_EXPORTS` target property set.  Teach
our internal `ExportImportList` script to optionally generate a leading
`#! .` line at the top of the generated export/import list.  Update our
rule for linking an executable with exports to generate a public-facing
"import library" implemented as an AIX linker import file.

With this approach, our existing infrastructure for handling import
libraries on Windows will now work for AIX linker import files too:

* Plugins that link to their executable's symbols will be automatically
  linked using the import file on the command line.

* The executable's import file will be (optionally) installed and
  exported for use in linking externally-built plugins.

This will allow executables and their plugins to build even if we later
turn off runtime linking.

Issue: #19163
2019-07-16 14:15:13 -04:00
John Freeman
b7b7f1806a Help: Fix typo in install(EXPORT_ANDROID_MK) example 2019-05-26 09:09:07 -05:00
Avraham Shukron
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties
Also support installing headers on an INTERFACE library.

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Fixes: #15234
2019-04-11 11:09:42 -04:00