Commit Graph

1309 Commits

Author SHA1 Message Date
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