Commit Graph

1473 Commits

Author SHA1 Message Date
scivision
a5b292c9a6 Help:try_compile: place options in their own section
As try_compile interface was enhanced in 3.25, the Help got a lot
longer. Make the options its own section for navigability.
2023-08-16 10:05:53 -04:00
Kyle Edwards
2ccb897d86 get_test_property(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
84e76fedb0 get_property(TEST): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
efc8f19cc5 set_tests_properties(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
753999d4db set_property(TEST): Add DIRECTORY option 2023-08-10 17:36:14 -04:00
Craig Scott
feca1d51ff Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:56 -04:00
Brad King
4240e74858 Merge topic 'doc-install'
b97350a151 Help: Add more install(TARGETS) examples
0827305032 Help: Clarify install(TARGETS) artifact-kind option group ordering
7bd6478dd0 Help: Use argument value placeholders consistently in install(TARGETS)
ae381e1075 Help: Reorganize install() sections
5d15231a67 Help: Revert "improve install() documentation of argument ordering"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8683
2023-08-07 12:02:45 -04:00
Brad King
efb21962fb Merge topic 'cxxmodules-try-compile'
be53c75852 cmExperimental: recycle the C++ modules API UUID
deb1c3cbd5 cmCoreTryCompile: forward module-related binutils variables
b768d293c5 cmCoreTryCompile: use the source type context for source files
93993c7ad4 cmArgumentParser: support storing a context value with parsing
c9ca5f6326 cmCoreTryCompile: parse `SOURCES_TYPE` argument
07551f35de cmCoreTryCompile: use `target_sources` for `try_compile` targets
aad9033b56 cmExperimental: support forwarding associated variables to `try_compile`
f6cf433256 cmExperimental: only forward C++ module support to non-ABI checks
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8639
2023-08-07 11:57:00 -04:00
Craig Scott
91336d061c
Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY 2023-08-04 19:16:28 +10: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
Ben Boeckel
c9ca5f6326 cmCoreTryCompile: parse SOURCES_TYPE argument
This will serve to add context for the source listing in order to
properly mark sources as `FILE_SET TYPE CXX_MODULES` in the generated
code.
2023-07-31 11:37:47 -04:00
Kyle Edwards
4cf5eab79d Merge topic 'xcframework-find-library'
9bf8f7de06 find_library(): Add support for .xcframework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8661
2023-07-28 14:59:14 -04:00
Kyle Edwards
9bf8f7de06 find_library(): Add support for .xcframework
Issue: #21752
2023-07-28 14:41:45 -04:00
Brad King
e49ff2b2f2 Merge topic 'ExportTestLabelToJUnit'
2b99e64413 set_test_properties: link to the test properties in the documentation
b11e8afbfa ctest: export test labels to junit xml

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8635
2023-07-28 09:12:23 -04:00
Kyle Edwards
07ac0c0ae0 Merge topic 'xcframework-target-link-libraries'
7050ac56a1 macOS: Add support for linking against .xcframework folders
93ed53790c bootstrap: Unconditionally build libjsoncpp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8619
2023-07-27 10:06:22 -04:00
Brad King
c46182cf55 Merge topic 'doc-if-exists'
3ab132d86f Help: Document that if(EXISTS) requires paths to be readable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8656
2023-07-27 09:59:20 -04:00
Kyle Edwards
7050ac56a1 macOS: Add support for linking against .xcframework folders
Issue: #21752
2023-07-26 17:00:01 -04:00
Alex Neundorf
2b99e64413 set_test_properties: link to the test properties in the documentation
It was linking to the target properties, this was probably an oversight.
2023-07-26 22:59:59 +02:00
Brad King
3ab132d86f Help: Document that if(EXISTS) requires paths to be readable
Issue: #25125
2023-07-26 11:06:53 -04:00
Kyle Edwards
ff12a57d5e exec_program(): Remove by policy CMP0153 2023-07-25 11:09:56 -04:00
Brad King
6194193a8a Merge topic 'file-REAL_PATH-relative'
6b5f2dbbfe file(REAL_PATH): resolve symlinks before '..' components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8605
2023-07-24 08:43:19 -04:00
Robert Maynard
6b5f2dbbfe
file(REAL_PATH): resolve symlinks before '..' components
Previously REAL_PATH would collapse paths before resolving any symlinks
so if `..` crossed a symlink the output from `REAL_PATH` would be wrong.

It looked like REAL_PATH did this by mistake since it was a side-effect
of ensuring we had an absolute path before resolving symlinks.
2023-07-20 17:02:58 -04:00
Brad King
88c6dc75ba Merge topic 'command-job-server-aware'
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8547
2023-07-20 10:23:31 -04:00
Chris Mahoney
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE
Issue: #16273
2023-07-19 10:45:33 -04:00
Brad King
18d9a54ba6 Merge topic 'export-doc-config-map'
38737e3970 Help: Mention imported config mapping in export() and install() docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8637
2023-07-18 13:51:16 -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
Brad King
d1538805b5 Merge topic 'doc-add_custom_command'
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: William Jones <william.luke.jones@gmail.com>
Merge-request: !8602
2023-06-29 11:49:35 -04:00
Brad King
7952e11466 Merge topic 'doc-add_custom_command' into release-3.27
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: William Jones <william.luke.jones@gmail.com>
Merge-request: !8602
2023-06-29 11:49:34 -04:00
Brad King
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL
Build events are attached to existing build statements so we cannot
independently control the job pool.

Issue: #25040
2023-06-29 10:57:38 -04:00
Brad King
6d549cd9fe Merge topic 'doc-target_precompile_headers'
a3dfaf8a5c Help: Fix wrong command name in target_precompile_headers docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8600
2023-06-29 10:07:02 -04:00
Brad King
c7e3668b00 Merge topic 'doc-target_precompile_headers' into release-3.27
a3dfaf8a5c Help: Fix wrong command name in target_precompile_headers docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8600
2023-06-29 10:07:01 -04:00
Brad King
28dc0ef040 Merge topic 'doc-list-xref'
60b393096f Help: Link to cmake-language(7) list docs from list() command docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8597
2023-06-29 09:54:14 -04:00
Craig Scott
a3dfaf8a5c
Help: Fix wrong command name in target_precompile_headers docs 2023-06-29 09:27:10 +10:00
Brad King
60b393096f Help: Link to cmake-language(7) list docs from list() command docs
Fixes: #25036
2023-06-28 07:51:37 -04:00
Brad King
024791a702 Merge topic 'alias-set-target-prop'
aed550410a Help: Clarify that you can't set properties on ALIAS targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8591
2023-06-27 11:03:37 -04:00
Ryan Friedman
aed550410a Help: Clarify that you can't set properties on ALIAS targets
Issue: #19445
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-26 12:47:26 -04:00
Brad King
9189a59f8b Merge topic 'doc-project-none'
9dd2dd5b77 Help: Restore project command docs for default languages and NONE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8585
2023-06-23 10:42:25 -04:00
Brad King
5fb68744d4 Merge topic 'doc-project-none' into release-3.27
9dd2dd5b77 Help: Restore project command docs for default languages and NONE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8585
2023-06-23 10:42:24 -04:00
Brad King
9dd2dd5b77 Help: Restore project command docs for default languages and NONE
In commit b787be2714 (Help: Update supported languages in project and
enable_language, 2023-01-20, v3.26.0-rc1~53^2) the relevant paragraph
was accidentally moved to the `enable_language` command documentation.

Fixes: #25016
2023-06-22 13:12:24 -04:00
Brad King
536c1de1d4 Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25.  Remove it.
2023-06-13 14:20:48 -04:00
Craig Scott
99b2ccf80d cmake_file_api: New project command
Projects can use the new command to request file API replies for the current
run. No query files are generated, the query is tracked internally. Replies are
created in the file system at generation time in the usual way.

Fixes: #24951
2023-06-05 06:20:50 -04:00
Ben Boeckel
6ff5cdc533 cxxmodules: remove support for CXX_MODULE_HEADER_UNITS filesets
There's no backing implementation for header units anyways, so just
remove it for now.
2023-05-31 10:57:11 -04:00
Brad King
77aaf1b04a Merge topic 'help_configure_file'
b2b97d015e Help: configure_file: add $CACHE{VAR} and $ENV{VAR} to description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8500
2023-05-23 11:02:43 -04:00
Brad King
04b0d5c862 codespell: Fix typos 2023-05-22 16:51:15 -04:00
Torsten Rasmussen
b2b97d015e Help: configure_file: add $CACHE{VAR} and $ENV{VAR} to description
The configure_file(...) and string(CONFIGURE ...) functions also
substitutes variables of the form: $CACHE{VAR} and $ENV{VAR}.

Therefore add this information to the help documentation so that this
behavior is described to users
2023-05-22 12:46:04 -04:00
Craig Scott
949dcdb3bc
Help: Clarify PRE_BUILD option for add_custom_command()
Fixes: #24889
2023-05-19 12:40:36 +10:00
Leonid Pospelov
c64f6d5a5a Help: Document append functionality of string(JSON) 2023-05-03 04:41:53 -04:00
Alex Neundorf
c584882b26 Help: change links to point to the env.vars, not to the cmake vars
The documentation of the find-commands was pointing to the
cmake variables CMAKE_PREFIX_PATH, CMAKE_INCLUDE_PATH etc.
also in the section for environment variables. Now they point
to the documentation for the respective environment variables.
2023-05-01 15:12:23 +02:00
Marc Chevrier
31675964e7 GenEx LIST: list operations
Fixes: #24550, #24547
2023-04-16 12:00:20 +02:00
Brad King
561ae21f40 Help: Clarify that {add,target}_compile_options are not used for linking
Link to alternatives that can be used for adding link options.

Issue: #24662
2023-03-31 11:30:51 -04:00
Brad King
f93b13151e Help: Link to COMPILE_LANGUAGE genex from add_compile_options
Follow-up commit e2830cf16b (Help: Link to COMPILE_LANGUAGE genex
from target_compile_options, 2023-03-28).

Issue: #24639
2023-03-31 11:01:13 -04:00
Brad King
e2830cf16b Help: Link to COMPILE_LANGUAGE genex from target_compile_options
Issue: #24639
2023-03-28 10:57:31 -04:00
Brad King
eb890ba3fc Merge topic 'file-GET_RUNTIME_DEPENDENCIES-windows-casing'
5922c86ed6 file(GET_RUNTIME_DEPENDENCIES): Document case-preserving change on Windows
7dffe99ad8 Tests: Restore CudaOnly.RuntimeControls cudart verification on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !8367
2023-03-28 08:13:31 -04:00
Brad King
5922c86ed6 file(GET_RUNTIME_DEPENDENCIES): Document case-preserving change on Windows
In commit fa45594407 (file(GET_RUNTIME_DEPENDENCIES): Preserve casing
for Windows PE binaries, 2023-03-06) we neglected to update associated
documentation.
2023-03-27 09:49:51 -04:00
Brad King
512f64289a Help: Clarify that set(VAR) unsets VAR
Also call out possible exposure of an existing cache entry of the same
name, as we have for the `unset` command since commit 1a0f1a25a4 (Help:
Clarify the unset command, 2018-08-17, v3.13.0-rc1~199^2).

Issue: #24633
2023-03-24 14:44:45 -04:00
Matthew Woehlke
c8f65d2b67 Help: Improve file command signatures
Fix a couple of file command signatures that were not using angle
brackets to mark arguments.
2023-03-15 10:53:25 -04:00
Matthew Woehlke
68fb1572a8 Help: Convert signatures of file command
Convert `file` command to use new `signature` directive. Use '<HASH>'
rather than 'HASH' for relevant signature targets, as this is arguably
more correct, results in less need to specify explicit targets, but
still produces '#hash' as the HTML anchor.

Although actual textual changes to `file` are fairly minimal, large
portions of the content have been re-indented and in many cases,
re-flowed. Some tabular content in literal text blocks has also been
converted to actual tables.
2023-03-15 10:53:25 -04:00
Matthew Woehlke
a239a2a414 Help: Convert signatures of list and set commands
Convert documentation of the `list` and `set` commands to use new
`signature` directive. Use new `cref` role in the `list` introduction so
that the subcommands there are links rather than just text. Turn
references into `string` subcommands into actual links. Reformat some
prose as definition lists.
2023-03-15 10:53:25 -04:00
Brad King
3600be4e31 Help: Use signature directive for 'if' command 2023-03-07 13:38:39 -05:00
Brad King
bedd62d52c Help: Improve sentence structure around "if so" 2023-03-07 13:38:29 -05:00
Brad King
ae7c4a5ff4 Help: Add internal cross-references to 'if' command docs 2023-03-07 08:50:31 -05:00
Brad King
95bfacb8bb Help: Indent 'if' command docs more consistently 2023-03-07 08:50:31 -05:00
Brad King
3d6075da4d Merge topic 'improve-doc-signatures'
533ebb072b Help: Use signature directive for string command
cd33f461a6 Help: Use signature directive for cmake_language command
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
c09b760484 Utilities/Sphinx: Drop commented-out code from cmake domain impl
6e85ad7f8b Help/dev: Add per-directive sections in CMake Documentation Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8243
2023-03-07 08:49:30 -05:00
Matthew Woehlke
533ebb072b Help: Use signature directive for string command 2023-03-06 09:52:52 -05:00
Matthew Woehlke
cd33f461a6 Help: Use signature directive for cmake_language command 2023-03-06 09:52:12 -05:00
Brad King
1d7fb31778 Merge topic 'Apple-handle-Text-Stubs'
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
fcbd723a50 Enhance support functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8204
2023-03-02 09:53:03 -05:00
Brad King
5691e7e900 Merge topic 'try-doc'
b6cfbe7b17 Help:try_{compile,run}: clarify, encourage new syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8262
2023-03-01 09:11:55 -05: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
scivision
b6cfbe7b17 Help:try_{compile,run}: clarify, encourage new syntax 2023-02-28 08:59:16 -05:00
scivision
9b56aabd99 Help:file: document HTTPHEADER more
Some servers have allow-lists for HTTP UserAgent for example.
CMake project devs would benefit from this hint about setting
authorization tokens and HTTP User Agent.
2023-02-24 12:32:41 -05:00
Brad King
df9c4b1872 find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables
as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check
upper-case `<PACKAGENAME>_ROOT` variables.  Add policy `CMP0144` to
enable the behavior in a compatible way.

Fixes: #24403
2023-02-23 09:15:14 -05:00
Brad King
4da27a73bd Help: Document <PackageName>_ROOT variable ordering using an ordered list
Make room to add more steps in a documented order.
2023-02-23 09:12:29 -05:00
Brad King
d18806e673 Merge topic 'ninja-custom-command-depends'
ea2a05f402 Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8220
2023-02-20 08:34:34 -05:00
Abdelmaged Khalifa
ea2a05f402 Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable
option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`.

Fixes: #17097
2023-02-17 17:12:12 +02:00
Brad King
f7be10b26a Merge topic 'ci-linkcheck'
0787148785 gitlab-ci: Report sphinx logs as artifacts of its lint job
14506f49a2 Utilities/Sphinx: Configure linkcheck allowed permanent redirects
3c5b34af9d Help: Replace links with their permanent redirects
1004be159f FindCUDAToolkit: Replace broken links to NVIDIA documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8210
2023-02-17 08:54:51 -05:00
Brad King
3c5b34af9d Help: Replace links with their permanent redirects 2023-02-17 08:45:01 -05:00
scivision
6e71c31afd Help:add_test: emphasize important points
* enable_testing must be called to enable testing
* can only set properties on tests created in same directory
* WILL_FAIL still fails on segfault and similar
* compact wording
2023-02-15 16:23:35 -05:00
Brad King
e2ed34abf8 Merge topic 'ninja-custom-command-depends'
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8198
2023-02-15 08:57:32 -05:00
scivision
68a46505a3 Help: math: note that floating point inputs are invalid 2023-02-14 13:33:31 -05:00
Abdelmaged Khalifa
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja
Add option `DEPENDS_EXPLICIT_ONLY` to `add_custom_command` to indicate
that implicit dependencies coming from users of the output are not
needed, and only consider dependencies explicitly specified in the
custom command.

Fixes: #17097
2023-02-14 08:56:59 -05:00
Brad King
df31400648 Merge topic 'doc-find_package-root-case'
20e727a408 Help: Clarify that <PackageName>_ROOT variable names are case-preserved

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8182
2023-02-09 10:01:52 -05:00
Brad King
20e727a408 Help: Clarify that <PackageName>_ROOT variable names are case-preserved
The name comes from the case-preserved first argument to
`find_package`.
2023-02-08 14:06:38 -05:00
Brad King
9492ca9a3f Merge topic 'KateImprovements'
e7f7bff4f5 Kate: improve the way the VCS-specific files are searched
96389b4cd3 Kate: add support for hg and fossil
4c32623f5f Help: fix typo in docs for set_property()
9a7612d2d0 Kate: make it possible to force a mode for the "files" entry
8a7aa2642b Help: add documentation for Kate-related variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8154
2023-02-07 09:48:23 -05:00
Alexander Neundorf
4c32623f5f Help: fix typo in docs for set_property() 2023-02-06 10:21:35 -05:00
scivision
1e95f765d5 Help: Clarify interaction of execute_process *_FILE and *_VARIABLE options
These parameters are so important that it's worthwhile to be more
explicit about their interaction.

Fixes: #24392
2023-02-06 09:47:52 -05:00
Brad King
abddcd370f Help: Clarify add_custom_command OUTPUT relative path behavior
Issue: #24372
2023-01-30 13:50:01 -05:00
Robert Maynard
c89d467bf2 Help: configure_file doc example use target_include_directories
Fixes #24351
2023-01-25 12:30:15 -05:00
Brad King
1d6d10cbf6 Merge topic 'isdir_empty'
a1dc38a567 Help: Document behavior of if(EXISTS,IS_DIRECTORY) for empty paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8109
2023-01-25 11:15:46 -05:00
scivision
a1dc38a567 Help: Document behavior of if(EXISTS,IS_DIRECTORY) for empty paths
Document and add explicit tests for empty string input:
`if(EXISTS "")` and `if(IS_DIRECTORY "")` are always false.
This avoids need for users to do extra checks due to
CMake non-short-circuit logic as below:

    if("${p}")
      if(EXISTS "${p}")
2023-01-24 14:13:52 -05:00
Robert Maynard
b787be2714 Help: Update supported languages in project and enable_language 2023-01-20 13:55:38 -05:00
Brad King
a78cba5197 message: Add CONFIGURE_LOG mode to record a message in the configure log
Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)`
that records messages in the configure log.

Issue: #23200
2023-01-18 11:37:11 -05:00
Brad King
645671d36f Help: Document configure log behavior in try_compile and try_run 2023-01-18 11:37:02 -05:00
Brad King
d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log 2023-01-16 17:16:12 -05:00
Brad King
9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log
Issue: #23200
2023-01-16 16:58:50 -05:00
Gustaf Borgström
b64a69b6c4 Help: Fix typo in configure_file docs 2023-01-11 16:32:35 -05:00
Craig Scott
c1294454e5 Merge topic 'doc-SYSTEM'
dfab263825 Help: Clarify and update SYSTEM-related docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8027
2022-12-19 15:57:22 -05:00
Marc Chevrier
d36754e163 Merge topic 'doc-updates'
22d36aa0f8 Help: string(JSON): avoid duplicate labels

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8028
2022-12-18 08:06:27 -05:00
Marc Chevrier
22d36aa0f8 Help: string(JSON): avoid duplicate labels 2022-12-17 12:42:36 +01:00
Craig Scott
dfab263825
Help: Clarify and update SYSTEM-related docs 2022-12-17 20:51:25 +11:00
Craig Scott
db6da7470a Merge topic 'doc-updates'
2ee845c0a5 Help: Add version information for SYSTEM option of add_subdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8025
2022-12-17 04:50:00 -05:00
Marc Chevrier
2ee845c0a5 Help: Add version information for SYSTEM option of add_subdirectory 2022-12-16 14:05:43 +01:00
Marc Chevrier
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
2022-12-13 16:54:56 +01:00
Brad King
303c48fbd4 Help: Add add_custom_command example with output consumed by multiple targets
This is a common use case, so add an example demonstrating it.
2022-12-08 15:12:32 -05:00
Brad King
5f2bf6ecc6 Help: Drop misleading add_custom_command "makefile terms" explanation
The "In makefile terms" explanation is left from very early days of
CMake to help developers migrating from hand-written makefiles.
These days it is often misinterpreted, particularly in the context
of multiple `add_custom_command` calls, to mean that we generate a
single Makefile containing rules for all custom commands.  This
leads to an incorrect mental model of the expressed build system.
The actual generated build system may spread the rules across multiple
targets that do not see the each other's file-level rules, which makes
target-level dependencies important too.
2022-12-07 18:39:37 -05:00
Brad King
14824129d9 Merge topic 'doc-SYSTEM'
b15b9cf286 Help: Clarify SYSTEM property default for imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7990
2022-12-07 08:12:05 -05:00
Brad King
b15b9cf286 Help: Clarify SYSTEM property default for imported targets
The `SYSTEM` directory property does not affect imported targets.

Fixes: #24219
2022-12-05 19:42:06 -05:00
Craig Scott
512056158f Merge topic 'doc-add_compile_options-example'
f03a1833e2 Help: Update compiler-specific add_compile_options() example and prose

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7959
2022-11-29 06:35:55 -05:00
Michael Hirsch
f03a1833e2
Help: Update compiler-specific add_compile_options() example and prose
Avoid hard-coding a warning-as-error flag now that CMake offers a
first class abstraction for that.

Also mention some relevant generator expressions which can be used
to provide even more specific targeting with language-specific flags.

Fixes: #24200
2022-11-29 09:12:17 +11:00
Craig Scott
ab5aeca849
Help: Clarify behavior of BEFORE with target_compile_options() 2022-11-27 20:35:14 +11:00
Brad King
62172b4ab7 Merge topic 'custom-command-comment-genex'
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
2022-11-22 09:47:59 -05:00
Peter Würth
26d813092b add_custom_{command,target}: add genex support for COMMENT
Evaluate and expand generator expressions in the `COMMENT` argument of
the `add_custom_command()` and `add_custom_target()` commands.
This allows to include generator expressions, e.g. a targets location
$<TARGET_...> or the current configuration $<CONFIG>, in the build-time
messages.

Fixes #22507
2022-11-19 13:32:56 +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
Brad King
efa9eec040 file(COPY_FILE): Add option to retry on Windows if input access fails
On Windows, a file may be inaccessible for a short time after it is
created.  This occurs for various reasons, including indexing, antivirus
tools, and NTFS's asynchronous semantics.  Add an `INPUT_MAY_BE_RECENT`
option to tell CMake that the input file may have been recently created
so that we can retry a few times to read it.
2022-11-17 15:05:07 -05:00
Amir Masoud Abdol
ed519b1cba file(ARCHIVE_CREATE): Allow higher compression level for Zstd
This allows the Zstd compression-level to be set between 0-19.  I've
adjusted some of the tests, and error messages to indicates the selected
algorithm, and min/max of its compression-level.

Fixes: #24160
2022-11-16 09:15:01 -05:00
friendlyanon
59573bf5b9 project: Warn at top-level if cmake_minimum_required wasn't called
The top-level project() call will now issue an AUTHOR_WARNING if it
wasn't called after cmake_minimum_required().

Fixes: #24071
2022-11-11 22:49:36 +01:00
Brad King
e159b5b2ae Merge topic 'doc-improvements'
d4d1f85297 Help: Move a note about arguments and genexes into include file
968224484f Help: Drop unused `PROPERTY_GENEX` replace from `prop_tgt/INTERFACE_*` files
65457e4fae Help: Add _See Also_ sections to related CMake commands
c86ec79d07 Help: Use direct refs to genexes instead of ``$<GENEX-NAME>``
8c6274326d Help: Use CMake highlighting for command synopsis
c356a94512 Help: Use monospaced font for a genex name in a section title
f98c8707f4 Help: Use `code-block:: cmake` instead of `::` for sub-commands descriptions
2ba351ca4f Help: ``CMake`` → CMake
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7873
2022-11-10 10:11:22 -05:00
Alex Turbov
d4d1f85297
Help: Move a note about arguments and genexes into include file 2022-11-09 23:52:30 +04:00
Alex Turbov
65457e4fae
Help: Add _See Also_ sections to related CMake commands 2022-11-09 23:52:30 +04:00
Alex Turbov
c86ec79d07
Help: Use direct refs to genexes instead of `$<GENEX-NAME>` 2022-11-09 23:52:30 +04:00
Alex Turbov
8c6274326d
Help: Use CMake highlighting for command synopsis
Most of CMake commands use it. Fix a few of them to do the same.
2022-11-09 23:52:30 +04:00
Alex Turbov
c356a94512
Help: Use monospaced font for a genex name in a section title 2022-11-09 23:52:29 +04:00
Brad King
5b0b18bc35 Merge topic 'doc-block-return'
1046a61cfd Help: clean up and clarify block() and return()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7872
2022-11-08 09:01:24 -05:00
Brad King
09fb50a167 Merge topic 'doc-block-return' into release-3.25
1046a61cfd Help: clean up and clarify block() and return()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7872
2022-11-08 09:01:23 -05:00
Craig Scott
3c7707cf9d Merge topic 'doc-find-validator'
7e1a4567fb Help: Make VALIDATOR wording clearer and more precise

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7874
2022-11-08 06:42:29 -05:00
Alex Turbov
f98c8707f4
Help: Use code-block:: cmake instead of :: for sub-commands descriptions
Most of CMake commands use syntax highlighting when describe
sub-commands syntax. Fix a few of them to be like others...
2022-11-07 22:55:07 +04:00
Alex Turbov
cc8837606c
Help: Unindent _See Also_ related commands list
To make it similar to other commands.
2022-11-07 22:55:06 +04:00
Craig Scott
1046a61cfd
Help: clean up and clarify block() and return() 2022-11-08 00:05:55 +11:00
Craig Scott
7e1a4567fb
Help: Make VALIDATOR wording clearer and more precise 2022-11-07 23:51:51 +11:00
Alex Turbov
029210730a
Help: Use role :program:
When mention execitable names use Sphinx semantic role `:program`
instead of ``executable`` or **executable**.
2022-11-06 04:28:21 +04:00
Vasiliy Koyrev
9da542d5c1 string(TIMESTAMP): Add %z and %Z for adding time zone string
Fixes: #24056
2022-10-27 11:13:46 -04:00
Brad King
a0523f81d1 Merge topic 'doc-cli-xrefs'
3043c17039 Help: Add more CLI `:option:` references to various pages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7811
2022-10-21 10:19:54 -04:00
Brad King
63d28469cd Merge topic 'doc-cli-xrefs' into release-3.25
3043c17039 Help: Add more CLI `:option:` references to various pages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7811
2022-10-21 10:19:53 -04:00
Alex Turbov
3043c17039 Help: Add more CLI :option: references to various pages 2022-10-20 11:21:40 -04:00
Alex Turbov
65dc8aa8b3 Help: Mention CMake version for a recently-added find_package search path
Add a `versionadded` mark for the search path added by commit e55c154c5b
(cmFindPackageCommand: Add one more search path, 2022-06-27,
v3.25.0-rc1~339^2~1).

Fixes: #24067
2022-10-20 11:17:46 -04:00
Alex Turbov
93871cb5a9 Help: Reformat find_package search paths as Sphinx tables 2022-10-20 11:17:46 -04:00
Brad King
4cb8564087 Merge topic 'doc-timestamp-f' into release-3.25
7d25ae7350 Help: Add versionadded for string(TIMESTAMP) %f specifier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7796
2022-10-17 10:00:57 -04:00
Brad King
7d25ae7350 Help: Add versionadded for string(TIMESTAMP) %f specifier
This was accidentally left out of commit c050d6a01e (string(TIMESTAMP):
add %f specifier for microseconds, 2022-01-27, v3.23.0-rc1~59^2).
2022-10-14 11:28:38 -04:00
Brad King
f9fd27a5ee Help: Fix typo that crashes older pygments lexers
In commit cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR},
2022-09-21, v3.25.0-rc1~94^2~2) we accidentally added unbalanced closing
`]` characters in the `try_compile` and `try_run` signatures.

Fixes: #24053
2022-10-13 12:04:00 -04:00
Craig Scott
f8b3b24915
Help: Minor grammar, typo and formatting cleanups 2022-10-09 13:34:05 +11: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
5e53164acf Merge topic 'improve-try_compile-debug-documentation'
3801785cc3 Help: Improve try_compile debug documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !7735
2022-10-04 10:28:32 -04:00
Brad King
6755539fca Merge topic 'fix-try_compile-doc-typo'
ef05a56387 Help: Fix typo in try_compile documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7736
2022-10-04 10:27:40 -04:00
Matthew Woehlke
3801785cc3 Help: Improve try_compile debug documentation
Update the --debug-trycompile documentation to account for recent
changes to try_compile. Mention where in the build tree to find
artifacts when using said option.
2022-10-03 11:44:58 -04:00
Matthew Woehlke
ef05a56387 Help: Fix typo in try_compile documentation 2022-09-30 15:49:35 -04:00