Commit Graph

902 Commits

Author SHA1 Message Date
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
Brad King
c966c71956 Merge topic 'get_filename_component-clarification'
c0e05671d3 Help/get_filename_component: clarify NAME_W[L]E summaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5489
2020-11-11 09:31:55 -05:00
Ben Boeckel
c0e05671d3 Help/get_filename_component: clarify NAME_W[L]E summaries
There was an ambiguity in the wording with the meaning of "or" typically
meaning exclusive-or in prose. Instead, ensure that the easiest parsing
is clear that the directory part is always removed.
2020-11-10 10:06:24 -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
Marc Chevrier
1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Craig Scott
604fa62c01 Merge topic 'string-json-doc-update' into release-3.19
49fce3373b Help: Clarify string(JSON) error handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5427
2020-10-30 07:15:40 -04:00
Craig Scott
f8aaa9fd39 Merge topic 'string-json-doc-update'
49fce3373b Help: Clarify string(JSON) error handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5427
2020-10-30 07:15:40 -04:00
Peter Steneteg
49fce3373b Help: Clarify string(JSON) error handling
Closes: #21355
2020-10-28 23:09:24 +11:00
Brad King
46b0d69e06 Merge topic 'cmake_path-update-doc'
ec5951e078 cmake_path: Enhance documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5425
2020-10-28 07:43:38 -04:00
Brad King
c79e02c4c3 Merge topic 'cmake-20866'
03ad0e61c1 configure_file: Add option for user defined permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5320
2020-10-27 07:11:13 -04:00
Brad King
ecab18bb7c Merge topic 'issue-21034'
1a3d125de8 target_sources: Support custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5421
2020-10-27 07:10:24 -04:00
Marc Chevrier
ec5951e078 cmake_path: Enhance documentation 2020-10-26 13:10:37 +01:00
Craig Scott
394a5b71b0 Merge topic 'docs-cleanup-3.19'
95c14579f2 Help: Cleanup typos and grammar for the 3.19 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5419
2020-10-26 07:16:03 -04:00
Asit Dhal
1a3d125de8 target_sources: Support custom targets
Fixes: #21034
2020-10-24 21:13:25 +02:00
Craig Scott
95c14579f2 Help: Cleanup typos and grammar for the 3.19 release 2020-10-24 22:58:42 +11:00
Asit Dhal
03ad0e61c1 configure_file: Add option for user defined permissions
User defined permissions and options to copy permissions are
implemented.

Fixes: #20866
2020-10-24 12:00:47 +02:00
Brad King
94c6295db1 Help: Document site_name command use of HOSTNAME variable 2020-10-22 10:20:43 -04:00
Kyle Edwards
146e1e6ba1 Ninja: Transform DEPFILEs with policy CMP0116
Fixes: #21267
2020-10-13 10:19:46 -04:00
Asit Dhal
116a427eb1 execute_process: add options for fatal errors on subprocess failure
Fixes: #19930
2020-10-01 17:07:44 +02:00
Brad King
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
Brad King
78ff24a3a7 Help: Use singular placeholder name in cmake_language signature 2020-09-29 10:00:23 -04:00
Craig Scott
ac5195c408 Merge topic 'find_package-version-range'
5b3356263c CMakePackageConfigHelpers: Add version range support
6bfc442fde FPHSA: add support of version range
d7df81067b find_package: Add support of version range
09095dbcd2 cmFindPackageCommand: Refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5226
2020-09-24 07:29:03 -04:00
Brad King
d827fdb6f9 Merge topic 'separate_arguments-program'
d832c1cc7d separate_arguments: add option PROGRAM
f4c21d4953 separate_arguments: refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5253
2020-09-23 12:05:26 -04:00
Brad King
f2daa025e3 {get,set}_property: Add support for referencing binary directories
Index directories by their binary directory path in addition to their
source directory path.

Fixes: #19262
2020-09-23 09:25:42 -04:00
Marc Chevier
d7df81067b find_package: Add support of version range
This enhancement is the first step for solving issue #21107
2020-09-23 12:52:25 +02:00
Marc Chevrier
d832c1cc7d separate_arguments: add option PROGRAM
Fixes: #21217
2020-09-22 16:32:34 +02:00
Brad King
44c5f5d4ec Merge topic 'cmake_path-updates'
82c9508313 cmake_path: enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5245
2020-09-22 08:03:51 -04:00
Asit Dhal
195d14e781 file(ARCHIVE_CREATE): Add option to control compression level
Fixes: #21125
2020-09-21 13:08:11 -04:00
Marc Chevrier
82c9508313 cmake_path: enhancements
* Fix error on parsing "c:a" (root-name without root-directory)
* Enrich documentation
2020-09-20 15:17:34 +02:00
Brad King
bb8afa0020 Merge topic 'string-json-support'
8eab76eb84 string(JSON): Adds JSON parsing support to the string command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5159
2020-09-17 09:47:43 -04:00
Peter Steneteg
8eab76eb84 string(JSON): Adds JSON parsing support to the string command
Adds a set of sub commands to the string command for parsing JSON, the
JSON commands are: GET, TYPE, MEMBER, LENGTH, REMOVE, SET, and EQUAL.

Closes: #19501
2020-09-16 13:55:24 -04:00
Deniz Bahadir
0a5c3e3b97 Help: add_library(<name> OBJECT) can omit the source files 2020-09-10 16:59:34 +02:00
Marc Chevrier
be36266dab file(): Add REAL_PATH sub-command 2020-09-08 18:33:57 +02:00
Brad King
2b51cc5481 Help: Fix typo in cmake_path(CMAKE_PATH) command signature
Fix a typo accidentally added by commit eb583b0a66 (cmake_path command:
path management, 2020-07-23).  Remove a stray `]` character that breaks
the pygments lexer.
2020-09-08 10:38:47 -04:00
Marc Chevrier
eb583b0a66 cmake_path command: path management
Fixes: #19568, #20922
2020-09-06 10:52:25 +02:00
Brad King
8f73ff0c37 Merge topic 'target_genex_dependency'
f14b390198 GenEx: Remove unneeded dependencies from target info queries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5127
2020-09-01 09:59:08 -04:00
Robert Maynard
f14b390198 GenEx: Remove unneeded dependencies from target info queries
Only generate a graph dependency between a custom command and
a target when the custom command queries for the file path
of an artifact of the target.

This makes generator expressions such as `TARGET_FILE_DIR`
behave the same way as `TARGET_PROPERTY` which never generated
a graph dependency.
2020-09-01 09:25:19 -04:00
Brad King
f7fbe40513 Merge topic 'file_chmod'
7de60beddf file: Add CHMOD and CHMOD_RECURSE subcommands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !5122
2020-09-01 09:19:18 -04:00
Brad King
f10682b796 Merge topic 'ispc_lang_support'
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
2020-09-01 09:15:39 -04:00
Robert Maynard
8976817d6d ISPC: Update help documentation to include ISPC 2020-08-28 11:21:31 -04:00
Sibi Siddharthan
7de60beddf file: Add CHMOD and CHMOD_RECURSE subcommands
Fixes: #21057

Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
2020-08-26 21:22:50 +05:30
Raul Tambre
27a912193b file(GENERATE): Add TARGET argument
Adds TARGET argument to file(GENERATE) to make resolving generator expressions
requiring a target possible.

Implements #21101, fixes #21074.
2020-08-20 17:41:52 +03:00
Deniz Bahadir
a20987732b add_test: Allow special characters in test name (w/ policy CMP0110)
Restore the change from commit f84af8e270 (add_test: Allow special
characters in test name, 2020-05-16, v3.18.0-rc1~142^2) that had to be
reverted by commit f84af8e270 (add_test: Allow special characters in
test name, 2020-05-16, v3.18.0-rc1~142^2) for compatibility.

Add policy CMP0110 to make the change in a compatible way.
Also, support even more characters than before by generating the
test scripts using bracket arguments around the test names.

Fixes: #19391
Signed-off-by: Deniz Bahadir <dbahadir@benocs.com>
2020-08-12 10:44:07 -04:00
Brad King
d6ee9b4a43 Merge topic 'build-interface-targets'
bafa9fe887 fileapi: Add INTERFACE libraries with SOURCES to codemodel-v2
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
afb998704e Remove filtering of allowed INTERFACE library properties
e7edba2baf Makefiles: Use IsInBuildSystem in global generator target type checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5078
2020-08-10 11:38:59 -04:00
Brad King
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem.  In practice, this has become limiting:

* Header-only libraries do have sources, they just do not compile.
  Developers should be able to edit those sources (the header files)
  in their IDE.

* Header-only libraries may need to generate some of their header
  files via custom commands.

Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.

Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.

Fixes: #19145
2020-08-07 08:46:32 -04:00
Brad King
1f1feb72f8 Help: Document in add_library that IMPORTED_IMPLIB is for DLL import libs
Fixes: #21053
2020-08-04 09:29:42 -04:00
Craig Scott
bda967bcb9 Merge topic 'doc-add_library-updates'
ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets
99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
716e76be3e Help: Re-order add_library sections
1b0adeea81 Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5086
2020-08-01 19:59:55 -04:00
Brad King
ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets 2020-07-31 12:04:17 -04:00
Brad King
99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
Move documentation on IMPORTED INTERFACE libraries to the main section
on Imported Libraries.  Revise the section to clarify the different
kinds of imported libraries that can be created and what properties they
need.

Issue: #18975
2020-07-31 11:40:15 -04:00
Brad King
716e76be3e Help: Re-order add_library sections
Put all the sections that create in-project targets first,
and move Imported Libraries and Alias Libraries at the end.
2020-07-31 11:22:28 -04:00