Commit Graph

5801 Commits

Author SHA1 Message Date
Tobias Nießen
cf4100d7da Help: Add that CMAKE_CACHEFILE_DIR might not be defined
CMake only sets `CMAKE_CACHEFILE_DIR` when writing `CMakeCache.txt`,
so the variable will usually be undefined when `CMakeLists.txt` runs.
Revise its documentation to clarify that `CMAKE_BINARY_DIR` should
be used instead.
2022-03-30 09:20:18 -04:00
Craig Scott
db774e9108 Help: Clean up and expand CPack/IFW docs 2022-03-27 16:30:45 +11:00
Brad King
6baef6784d Merge topic 'better_cross-ref_CMAKE_FIND_NO_INSTALL_PREFIX' into release-3.23
7dc654a017 Help: Better cross-reference CMAKE_FIND_NO_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7097
2022-03-23 09:34:41 -04:00
Kyle Edwards
26caa97057 define_property(): Change constraints of INITIALIZE_FROM_VARIABLE
Remove the requirement that the variable name have a prefix while
keeping the suffix requirement. Require that the property name
contains an underscore. Update docs and tests accordingly.

Fixes: #23340
2022-03-23 16:39:32 +11:00
Robert Maynard
7dc654a017 Help: Better cross-reference CMAKE_FIND_NO_INSTALL_PREFIX 2022-03-23 16:19:03 +11:00
Brad King
2aad4cef97 Merge topic 'revert-link-interface-direct-for-3.23' into release-3.23
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7098
2022-03-22 11:56:43 -04:00
Brad King
25c31f1955 Merge topic 'tutorial-license-name' into release-3.23
6892002fcb Tutorial: Fix casing of reference to License.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7100
2022-03-22 08:56:15 -04:00
Brad King
2f3cf60711 Merge topic 'cleanup-define_property' into release-3.23
87c3b5e421 define_property(): Only test prefix if INITIALIZE_FROM_VARIABLE is given
9b50f221f6 Help: Update the main purpose of define_property()
e993e2c52c Help: Clean up INITIALIZE_FROM_VARIABLE define_property() option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7090
2022-03-22 08:55:14 -04:00
Brad King
c216a5a716 Merge topic 'doc-test-property-genex' into release-3.23
78e0204e81 Help: Clarify when add_test and test properties support generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7101
2022-03-22 08:52:11 -04:00
Øystein Sørensen
6892002fcb Tutorial: Fix casing of reference to License.txt
Correct a tiny typo in the Step 7 tutorial.  Change so `License.txt`
correctly starts with a capital `L`.
2022-03-21 15:58:26 -04:00
Brad King
78e0204e81 Help: Clarify when add_test and test properties support generator expressions
Issue: #23329
2022-03-21 15:46:50 -04:00
Brad King
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch
Revert commit f3ad061858 (Add usage requirements to update direct link
dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage
updates in its predecessor commit 193a999cd5 (cmTarget: Add
INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage,
2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch.

After initial experience using the feature in practice, additional
design considerations have been raised for discussion in the original
issue.  To avoid rushing this for the 3.23 series, we've decided to
revert the feature for now so it can be revised for a future release.

Issue: #22496
2022-03-21 13:17:32 -04:00
Craig Scott
bf44efadab Help: Add more detail for CPACK_PRODUCTBUILD_DOMAINS* variables 2022-03-21 12:25:34 +11:00
Craig Scott
9b50f221f6 Help: Update the main purpose of define_property()
The BRIEF_DOCS and FULL_DOCS are remnants from before the
Sphinx-based documentation when CMake's internal structures
for defining properties included fields for their documentation.
They are no longer mandatory for define_property() and haven't
been in practical use for some time. The main use of the command
has evolved to now be more about how to initialize and inherit
properties, so update the docs to reflect that change in focus.

Issue: #20698
2022-03-19 17:33:45 +11:00
Craig Scott
e993e2c52c Help: Clean up INITIALIZE_FROM_VARIABLE define_property() option
INITIALIZE_FROM_VARIABLE is new in CMake 3.23, but the
versionadded note was missing in the original commit. The docs
also failed to mention that the new option only applies to target
properties.

Amends fce24e4f10 (define_property(): Add INITIALIZE_FROM_VARIABLE
argument, 2022-01-13)
2022-03-19 17:33:45 +11:00
Brad King
1b8669c1d6 Help: Document warning about multiple source paths
Although passing multiple source paths was never documented, it was not
diagnosed by CMake 3.22 and below.  In CMake 3.23 we now diagnose extra
paths and warn.  Document this change and add a release note.

Issue: #23334
2022-03-18 07:39:22 -04:00
Robert Maynard
fea270d3ed Help: Document cmake source and binary dir selection rules
Co-authored-by: Brad King <brad.king@kitware.com>
2022-03-17 09:38:32 -04:00
Brad King
b2ba662ca6 Merge topic 'doc-list-semicolons' into release-3.23
8abd714176 Help: Clarify that ENVIRONMENT test properties take ;-separated lists
02cf404ace Help: Add advice for dealing with semicolons in lists
c4117d9116 ExternalProject: Document that LIST_SEPARATOR works for CMAKE_ARGS too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7066
2022-03-16 11:14:58 -04:00
Brad King
8abd714176 Help: Clarify that ENVIRONMENT test properties take ;-separated lists
Follow up commit 79f64cc773 (Help: ENVIRONMENT_MODIFICATION clarify only
supports singular values, 2022-02-23) to specifically call out the list
format.

Issue: #23315
2022-03-15 15:49:21 -04:00
Brad King
02cf404ace Help: Add advice for dealing with semicolons in lists
Issue: #23315
2022-03-15 15:49:13 -04:00
Kyle Edwards
83a80e5193 Help: Clarify interaction of LANGUAGE and HEADER_FILE_ONLY 2022-03-15 13:06:35 -04:00
Brad King
790c225208 Merge topic 'doc-ignore-prefix-paths' into release-3.23
5cb0a730c9 Help: Clarify behavior of search ignore-related variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7056
2022-03-15 12:48:41 -04:00
Craig Scott
95cdce829f Help: Fix typo and improve readability for LINK_LIBRARIES_ONLY_TARGETS 2022-03-13 20:31:08 +11:00
Craig Scott
5cb0a730c9 Help: Clarify behavior of search ignore-related variables
Not all the behaviors of CMake variables for ignoring search
locations by find_...() commands were fully documented.
Add the missing effects, clarify the wording and restructure the
way the details are assembled to reduce duplication.

Also improve the cross-referencing to ensure all the related
variables are more discoverable.

Issue: #20878
2022-03-13 14:29:05 +11:00
Brad King
9acecc3eb9 Merge topic 'doc-file-sets' into release-3.23
4286b72240 Help: Update install() docs to better reflect preference for file sets
ab1b573f41 Help: Reorganise FILE_SETS and related properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7031
2022-03-09 12:07:57 -05:00
Brad King
11c25ae6ae Merge topic 'cmake-presets-file-dir' into release-3.23
f54507c2f6 CMakePresets.json: Add ${fileDir} macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !7051
2022-03-08 16:03:14 -05:00
Brad King
130c988982 Merge topic 'doc-lang-std-features' into release-3.23
fbda79f39d Help: Document explicitly that 'cxx_std_##' features may not add a flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: antmak <antmak.pub@gmail.com>
Merge-request: !7043
2022-03-08 08:25:19 -05: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
Kyle Edwards
f54507c2f6 CMakePresets.json: Add ${fileDir} macro
Fixes: #23214
2022-03-07 18:03:16 -05:00
Brad King
fbda79f39d Help: Document explicitly that 'cxx_std_##' features may not add a flag
This is commonly reported incorrectly as a bug, so call out this
behavior explicitly in the documentation.
2022-03-07 09:48:26 -05:00
Craig Scott
ab1b573f41 Help: Reorganise FILE_SETS and related properties
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.
2022-03-05 17:33:36 +11:00
Brad King
7a8536e0ea Merge branch 'release-3.22' into release-3.23 2022-03-04 12:52:28 -05:00
Brad King
6e9eaf209d CMake 3.22.3 2022-03-04 12:06:35 -05:00
Brad King
41d13ade7c Merge branch 'release-3.22' into release-3.23 2022-03-04 11:54:54 -05:00
Brad King
e7c9304504 Merge branch 'release-3.21' into release-3.22 2022-03-04 11:54:30 -05:00
Brad King
78ae759e01 CMake 3.21.6 2022-03-04 10:52:43 -05:00
Brad King
65da32c924 Merge topic 'file-set-name-requirements' into release-3.23
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
2022-03-04 09:09:31 -05:00
Kyle Edwards
8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block
Fixes: #23287
2022-03-03 14:31:54 -05:00
Kyle Edwards
b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name
Fixes: #23286
2022-03-03 10:17:10 -05:00
Brad King
04a7200c75 Merge topic 'cuda-arch-all' into release-3.23
2796d6eeca CUDA: Fix CMAKE_CUDA_ARCHITECTURES=all/all-major with NVCC 11.5+
e450d55552 Help: Update CUDA_ARCHITECTURES docs for generic all/all-major support
fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7026
2022-03-02 07:52:17 -05:00
Brad King
f0f4390325 Merge topic 'doc-presets-v4' into release-3.23
6404751176 Help: Improve wording and structure related to preset includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7028
2022-03-02 07:49:44 -05:00
Brad King
66a7d2e222 Merge topic 'file-set-no-custom-targets' into release-3.23
ad41c9cd11 target_sources(): Prohibit FILE_SET on custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7027
2022-03-02 07:45:57 -05:00
Craig Scott
6404751176 Help: Improve wording and structure related to preset includes
Encourage placing preset includes near the beginning of a preset
file and ensure the example shows that usage. Move the prose
discussing includes to its own section to improve discoverability
and break up paragraphs to make each main point harder to miss.

Also clarify ${sourceDir} to remove any ambiguity with regard to
its meaning in included files.

Issue: #23214
2022-03-02 11:37:57 +11:00
Brad King
e450d55552 Help: Update CUDA_ARCHITECTURES docs for generic all/all-major support
Since commit 8f64df0a7c (CUDA: Generic all and all-major support,
2021-12-19, v3.23.0-rc1~23^2), these special values do not require any
specific compiler or version.

While at it, re-organize CUDA_ARCHITECTURES special value documentation.
Move the `versionadded` markup inside each special value so we can add
more in future versions.
2022-02-28 21:30:23 -05:00
Kyle Edwards
ad41c9cd11 target_sources(): Prohibit FILE_SET on custom targets
Fixes: #23262
2022-02-28 17:21:04 -05:00
friendlyanon
6ff1217b9c Help: Add missing versionadded to *CROSSCOMPILING_EMULATOR
The list capability was added in CMake 3.15 by commit fec441ec17 (Teach
CROSSCOMPILING_EMULATOR to support arguments, 2019-05-30,
v3.15.0-rc1~6^2), but the documentation did not indicate the version
that added it.
2022-02-28 10:40:22 -05:00
Brad King
319584711c Merge topic 'vs-package-restore-docs' into release-3.23
d92469e572 Help: Clarify how package resolve mode is intended to be used
f320a31087 cmake --build: prioritize --resolve-package-references over preset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6984
2022-02-16 09:41:02 -05:00
Brad King
be87b7661c Merge topic 'doc-vs-instance-version' into release-3.23
e163908a76 Help: Clarify version specification in CMAKE_GENERATOR_INSTANCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6982
2022-02-16 09:38:59 -05:00
Carsten Rudolph
d92469e572 Help: Clarify how package resolve mode is intended to be used
Fixes: #23223
2022-02-15 10:20:14 -05:00
Carsten Rudolph
f320a31087 cmake --build: prioritize --resolve-package-references over preset
Fixes: #23224
2022-02-15 10:20:02 -05:00