Commit Graph

944 Commits

Author SHA1 Message Date
Elsie Hupp
c13f75982f Help: Clarify configure_file #cmakedefine01 syntax and behavior
Fixes: #21935
2021-03-15 09:15:08 -04:00
Ben Boeckel
088444211e file: add COPY_FILE subcommand
The `file(COPY)` subcommand is overloaded and busy for such a simple
operation. Instead, make a simpler subcommand with error handling
support.
2021-03-10 10:43:18 -05:00
Robert Maynard
934861e354 Find: Document that first argument to PATHS and HINTS can be ENV{} 2021-03-05 09:59:39 -05:00
Brad King
9bf40d8027 file(RENAME): Add option to not replace existing path
Add a `NO_REPLACE` option that prevents overwriting `<newname>`
if it exists.
2021-03-04 08:49:48 -05:00
Brad King
c61292726c file(RENAME): Add option to capture error message on failure 2021-03-04 08:44:06 -05:00
Michael Hirsch, Ph.D
22140f7af3 Help: Add internal links to if() docs 2021-02-18 10:20:34 -05:00
Brad King
5dd356cefc Help: Convert some genex names to explicit cross-references
Since commit c2dc7e0f53 (Help: Convert genex documentation to sphinx
domain objects, 2021-01-15) we can use `:genex:` cross-references to
link to named generator expressions.  Update some places to do this.

This is meant to demonstrate the capability, not as a comprehensive
sweep.
2021-02-05 16:05:25 -05:00
Brad King
07ca40408a Merge topic 'doc-find-env-vars'
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5772
2021-02-05 06:55:37 -05:00
Brad King
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE
Documentation updates in commit 02f527c66a (Find: Provide global
controls for the `NO_[]_PATH` call options, 2019-06-12,
v3.16.0-rc1~541^2) accidentally switched the `find_library`
documentation to mention `INCLUDE` where it should be `LIB`.

While at it, update `find_file` and `find_path` to mention
`INCLUDE` and `PATH` in the order they are considered.
2021-02-04 09:09:25 -05:00
Asit Dhal
5af38a11ce try_run: Allow to set working directory
Fixes: #17634
2021-02-03 08:42:05 +01:00
Brad King
8387aa20f2 Merge topic 'issue-19198'
255df8622b file(GENERATE): Support new line style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5649
2021-02-02 08:53:07 -05:00
Asit Dhal
255df8622b file(GENERATE): Support new line style
Fixes: #19198
2021-02-01 01:38:19 +01:00
william.r.dieter
8213390a3e Added SETUID and SETGID to the list of accepted file permissions
Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
2021-01-29 16:30:52 -05:00
Marc Chevrier
76cea3dfe2 cmake_path: rename 'GET ... RELATIVE_PATH' to 'GET ... RELATIVE_PART'
For consistency, subcommand 'HAS_RELATIVE_PATH' is also renamed
to 'HAS_RELATIVE_PART'.

Fixes: #21385
2021-01-28 11:06:31 +11:00
Michael Hirsch, Ph.D
e63e83d2b8 Help: Document that if(EXISTS) does not expand ~
Fixes: #21729
2021-01-26 09:50:01 -05:00
Craig Scott
c3ddb484d7 Help: Restructure and clarify cmake_path() docs
Relates: #21385
2021-01-16 23:58:09 +11:00
Marc Chevrier
50b8dc8735 Merge topic 'cmake_path-stabilization'
76f0bcdfb6 cmake_path: various updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5695
2021-01-15 05:47:02 -05:00
Marc Chevrier
76f0bcdfb6 cmake_path: various updates
To follow discussions in #21385 and !5682:
* Fix bug in cmCMakePath::IsSuffix() method
* cmake_path(HASH) always normalized paths (NORMALIZE option removed)
2021-01-13 15:27:49 +01:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Shannon Booth
55ba98556f Help: Add sections to if() conditions documentation 2021-01-09 10:03:46 +13:00
Marc Chevrier
cfd8a5ac1f Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286
Fixes: #21415
2020-12-23 15:47:46 +01:00
Brad King
72a28635b8 Merge topic 'issue-20134'
b68699b717 target_include_directories: Support AFTER option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5633
2020-12-22 09:13:08 -05:00
Brad King
3cf1a8c59b Merge topic 'issue-15653'
c3385dd8bd file(GENERATE): Support options to manipulate file permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5437
2020-12-22 09:12:20 -05:00
NeroBurner
af7882ba6e Help: replace deprecated $<CONFIGURATION> generator expression
The `$<CONFIGURATION>` genex has been deprecated since CMake 3.0.
Use `$<CONFIG>` instead in the `add_test` example.
2020-12-21 13:54:25 -05:00
Asit Dhal
c3385dd8bd file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
2020-12-21 12:16:16 +01:00
Asit Dhal
b68699b717 target_include_directories: Support AFTER option
Fixes: #20134
2020-12-19 14:51:39 +01:00
Kyle Edwards
dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands
Co-Author: Brad King <brad.king@kitware.com>
2020-12-15 07:01:21 -05:00
Brad King
2b1cc175ee Help: Clarify version adding add_custom_{command,target} OUTPUT genex support
Update the documentation added by commit c257c25419
(add_custom_{command,target}: Add genex support to OUTPUT and
BYPRODUCTS, 2020-10-19) to use sphinx markup instead of prose to specify
the version in which the feature was added.
2020-12-15 07:00:20 -05:00
Brad King
fedfe763ee Merge topic 'custom-command-output-genex'
c257c25419 add_custom_{command,target}: Add genex support to OUTPUT and BYPRODUCTS
f36af9228b cmLocalGenerator: Evaluate generator expressions in custom command outputs
c887cefd9a cmLocalGenerator: Simplify custom command output cmSourceFile creation
947ba01bf9 cmLocalGenerator: Factor out helper to expand custom command output paths
1902d28ebc cmLocalGenerator: Refactor UpdateOutputToSourceMap to avoid boolean trap
e4034eabe9 cmLocalGenerator: Re-order logic in CreateGeneratedSource
706c48301d cmCustomCommandGenerator: Treat relative outputs w.r.t. build dir
5d23c5446e cmCustomCommandGenerator: Refactor OUTPUT and DEPENDS path evaluation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5402
2020-12-14 07:22:45 -05:00
Brad King
3765a415df Merge branch 'master' into doc-3_19_release-fixes 2020-12-11 10:39:14 -05:00
Brad King
c257c25419 add_custom_{command,target}: Add genex support to OUTPUT and BYPRODUCTS
Move rejection of `#`, `<`, and `>` characters in outputs and byproducts
to a generate-time check.  This removes the front-end check that
disallowed generator expressions.  The generators have already been
updated to handle them.

Fixes: #12877
2020-12-11 08:24:21 -05:00
Craig Scott
ff4d1d44f2 Help: Clarify scope details of deferred call ids for cmake_language()
Fixes: #21586
2020-12-11 18:25:42 +11:00
Craig Scott
0816482302 Help: xref variable that cmake_minimum_required() sets
The CMAKE_MINIMUM_REQUIRED_VERSION has long been set by
the cmake_minimum_required() command, but the command docs
never mentioned this. Only the variable's own docs stated this but
the variable isn't very discoverable without it being mentioned in
the command's docs as well.
2020-12-11 11:19:04 +11:00
Brad King
c523d1cc32 Help: Add examples to add_custom_command reference documentation 2020-12-10 07:06:19 -05:00
Nikita Nemkin
5000f93a91 Help: Fix grammar in .. versionadded directives
Issue: #19715
2020-12-02 21:00:31 +05:00
Nikita Nemkin
ea59b0cd34 Help: Fix version note for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
This variable predates 3.0.

Fixes: #21522
2020-12-02 21:00:29 +05:00
Nikita Nemkin
05c3060b10 Help: Fix cmake_parse_arguments version note
Don't imply that cmake_parse_arguments() requires CMake 3.5+.
2020-12-02 21:00:28 +05:00
Brad King
ee4310c3d9 Merge topic 'compile_def_doc'
4b9fcadc9a Help: Describe definition values in target_compile_definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5547
2020-12-01 09:30:50 -05:00
Juan Ramos
4b9fcadc9a Help: Describe definition values in target_compile_definitions
Fixes: #20573
2020-11-30 13:22:37 -05:00
Deniz Bahadir
0eb30f175e GENERATED prop: Introducing policy CMP0118 and its documentation
Note: This is currently only defining the CMP0118 policy and providing
its documentation, however, the implementation is still not using it.
2020-11-24 17:41:02 +01:00
Craig Scott
eb04e25ba6 Merge topic 'cmake_path-enhancements'
ed21ad181e cmake_path: various enhancements to subcommands/keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5457
2020-11-14 06:39:42 -05: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
Marc Chevrier
ed21ad181e cmake_path: various enhancements to subcommands/keywords
This change address partly the remarks done in issue #21385
2020-11-11 23:43:51 +01: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