Commit Graph

1629 Commits

Author SHA1 Message Date
Juan Ramos
769866163a Help: Fix cmake_path example
Fixes: #25938
2024-04-26 08:49:07 -07:00
Brad King
a4b7a13c23 Merge topic 'doc-genex'
263f6b888c Help: Document TARGET_PROPERTY genex handling of transitive properties
f70eb84be7 Help: Clarify role of TARGET_NAME generator expression
36145e2680 Help: Organize target-dependent generator expressions into subsections
50eadd794e Help: Clarify cross-references to target-dependent generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9460
2024-04-25 11:25:30 -04:00
Brad King
50eadd794e Help: Clarify cross-references to target-dependent generator expressions 2024-04-25 10:49:16 -04:00
Brad King
2c3a9d5385 Merge topic 'help.file'
d2d2ffe1c1 Help: file: document GET_RUNTIME_DEPENDENCIES separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Juan Ramos <juan.ramos@kitware.com>
Merge-request: !9456
2024-04-25 10:28:36 -04:00
Joachim Wuttke (h)
d2d2ffe1c1 Help: file: document GET_RUNTIME_DEPENDENCIES separately
Moved documentation of file(GET_RUNTIME_DEPENDENCIES ...) from
the 'Reading' section to a separate section at the bottom of
the page. Because it is a very long text, and because this
signature is quite different from all the others in the
'Reading' section.
2024-04-24 15:28:39 +02:00
Brad King
835f34949e Help: Update cmake-buildsystem(7) build and usage requirements
Re-organize the section to explicitly describe target-specific
commands, build properties, and usage requirement properties.
Add builtin transitive properties that have been created since
the document was first written.
2024-04-24 09:06:32 -04:00
Martin Stadler
dc7a810a75 Help: Clarify documentation on regex character classes
In particular, give an example of matching `]`.
2024-04-11 08:46:37 -04:00
Craig Scott
97464aa970
enable_language(): Fail if called before project()
Fixes: #25550
2024-04-02 23:00:38 +11:00
Brad King
dea9982990 Merge topic 'patch-help-manually-added-dependencies'
e722f73e40 Help: Document MANUALLY_ADDED_DEPENDENCIES in add_dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9388
2024-04-01 09:42:32 -04:00
Brad King
252c2a6fcb Merge topic 'add_library-no-static-fallback'
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9347
2024-04-01 09:38:14 -04:00
Brad King
bed32f400e file(DOWNLOAD|UPLOAD): Document TLS_VERSION fallback to environment variable
This was missed by commit 434fe8a34b (file(DOWNLOAD|UPLOAD): Add
CMAKE_TLS_VERSION environment variable, 2024-02-26).
2024-03-29 14:17:58 -04:00
Peter Kokot
e722f73e40
Help: Document MANUALLY_ADDED_DEPENDENCIES in add_dependencies
This adds a note about the MANUALLY_ADDED_DEPENDENCIES target property
to the add_dependencies documentation page. It was introduced in v3.8.0.
2024-03-29 18:43:30 +01:00
Asit Dhal
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them
Add policy CMP0164 to provide compatibility.

Fixes: #25759
2024-03-29 11:06:32 -04:00
Brad King
bd3eaf83a1 Merge topic 'move-install-note'
8cbd6f5754 Help: Fix location of install() note about superseded commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9382
2024-03-29 09:15:11 -04:00
FeRD (Frank Dana)
8cbd6f5754 Help: Fix location of install() note about superseded commands
The note regarding commands superseded by install() somehow wound
up nested under the install(EXPORT) signature, when it has nothing
to do with install(EXPORT). Move it to the top level, immediately
before the Examples section.
2024-03-28 16:59:00 -04:00
Juan Ramos
89aac1fbe8 add_dependencies: Document behavior under Ninja generators
Closes: #25796
2024-03-28 09:48:08 -07:00
Brad King
cf6083cc6e Merge topic 'doc-linker-vars'
6ba2bbc0f3 Help: Restructure and improve LINKER_TYPE docs
c39bc6e412 Help: CMAKE_<LANG>_USING_LINKER_<TYPE> can be a list of flags
1c7ccefd83 Help: Add custom linker example for CMAKE_<LANG>_USING_LINKER_<TYPE>
aecea7b28b Help: Grammar, typos and wording improvements for linker variables
5b21897c6e Help: Remove stray formatting for try_compile() LINKER_LANGUAGE keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9362
2024-03-27 08:18:10 -04:00
Craig Scott
5b21897c6e
Help: Remove stray formatting for try_compile() LINKER_LANGUAGE keyword 2024-03-22 20:58:32 +11:00
Brad King
aa643b66a8 Merge topic 'doc-release-3.29-typos'
eceb368ccc Help: Fix typos in 3.29 docs
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9353
2024-03-19 10:10:16 -04:00
Brad King
b877fb49ce Merge topic 'doc-release-3.29-typos' into release-3.29
eceb368ccc Help: Fix typos in 3.29 docs
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9353
2024-03-19 10:10:15 -04:00
Brad King
6b035118de Merge topic 'doc-exit-code-range'
c980745b82 Help: Specify advisable range for exit code in cmake_language(EXIT)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9352
2024-03-19 10:09:20 -04:00
Craig Scott
c980745b82
Help: Specify advisable range for exit code in cmake_language(EXIT)
The limitations added here are documented in the bash shell's
reference manual.
2024-03-19 22:37:52 +11:00
Craig Scott
eceb368ccc
Help: Fix typos in 3.29 docs 2024-03-19 21:47:28 +11:00
Brad King
e3a8a6fc0c Merge topic 'doc-project-include-vars-3.29'
dcb894fb00 Help: Update project() code injection for new 3.29 include behavior
09cf39ab07 Help: Improve wording of CMAKE_PROJECT_..._INCLUDE... changes for 3.29

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9343
2024-03-18 13:59:53 -04:00
Craig Scott
dcb894fb00
Help: Update project() code injection for new 3.29 include behavior
Specifically, the various CMAKE_PROJECT_...INCLUDE... variables can
now take a list of things, and those things can be module names
too, not just file names.
2024-03-16 17:43:25 +11:00
Brad King
b7c78e1592 Merge topic 'export-find_dependency-calls'
3a739d4dcb EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9336
2024-03-13 10:57:08 -04:00
Brad King
3a739d4dcb EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate
Some design concerns have been raised after trying the 3.29 release
candidates.  Avoid committing to a stable public interface for now.

Issue: #25767
2024-03-12 14:24:53 -04:00
Brad King
89e99cca63 Merge topic 'ctest-j-default'
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
bbcbcff7d9 cmCTestMultiProcessHandler: Modernize member initialization
7457b474a1 Tests: Remove unnecessary parallel suppression from CTestCoverageCollectGCOV
ae69801d96 Tests: Convert CTestTestSkipReturnCode to RunCMake.ctest_test case
30dda49416 Tests: Convert CTestTestSerialOrder to RunCMake.ctest_test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9315
2024-03-11 10:18:50 -04:00
Brad King
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
Under job server integration, added by commit 80fe56c481 (ctest: Add
support for running under a make job server on POSIX systems,
2023-11-15, v3.29.0-rc1~324^2), use a very high default so that
parallelism is effectively limited only by available job server tokens.

Otherwise, choose a default limit based on the number of processors.

Also allow passing `0` to specify unbounded parallelism.

Fixes: #25739
2024-03-10 11:41:39 -04:00
Brad King
7d1aae7a60 Merge topic 'Help-add_custom_command-grammo'
b03356f954 Help/add_custom_command: fix verb grammo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9297
2024-02-29 07:59:28 -05:00
Ben Boeckel
b03356f954 Help/add_custom_command: fix verb grammo 2024-02-28 13:21:52 -05:00
Brad King
c481ddda14 Merge topic 'curl-tls-version'
434fe8a34b file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variable
fb9a6cf909 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
8e6776b9f3 file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9290
2024-02-28 09:03:20 -05:00
Brad King
fb9a6cf909 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
Issue: #25701
2024-02-28 08:40:27 -05:00
Brad King
8e6776b9f3 file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connections
Add an option to specify the minimum allowed TLS version for https
connections.

Issue: #25701
2024-02-28 08:40:14 -05:00
Brad King
70293ec345 Merge topic 'Help-file-ARCHIVE_EXTRACT-mention-working-dir'
189d28d77d Help/file: mention the working directory for `ARCHIVE_EXTRACT`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9291
2024-02-27 09:11:43 -05:00
Brad King
5ac8368922 Merge topic 'Help-file-ARCHIVE_EXTRACT-mention-working-dir' into release-3.29
189d28d77d Help/file: mention the working directory for `ARCHIVE_EXTRACT`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9291
2024-02-27 09:11:42 -05:00
Ben Boeckel
189d28d77d Help/file: mention the working directory for ARCHIVE_EXTRACT
See: https://discourse.cmake.org/t/10135
2024-02-27 05:53:08 -05:00
Brad King
2c646641ec Help: Document create_test_sourcelist source path convention
Document the change in commit a29ca55b1f (create_test_sourcelist: use
the full path to the driver, 2023-12-09, v3.29.0-rc1~264^2).
2024-02-22 09:37:23 -05:00
Brad King
c21f0eb30b Help: Modernize create_test_sourcelist documentation 2024-02-22 09:32:00 -05:00
Robert Maynard
af293ff7c3 Help: Explicitly discourage absolute install destinations
Document some of the problems caused by absolute install destinations.
Encourage use of relative paths.
2024-02-16 09:53:55 -05:00
Johannes Schultz
c6f56153bb Help: Fix example for return command
`cmake_minimum_required` is the correct command, not
`cmake_version_required`.
2024-02-15 10:42:25 -05:00
Brad King
d968391a0f Merge topic 'doc-autogen' into release-3.29
ccaf529c4e Autogen: Update Documentation
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9223
2024-02-08 11:10:47 -05:00
Orkun Tokdemir
ccaf529c4e Autogen: Update Documentation
* Add Qt 6 to documentation
* Add explanation about `<ORIGIN>_autogen_timestamp_deps`

Fixes: #25201
2024-02-08 09:16:37 -05:00
Brad King
2ce6337503 Help: Reword if(EXISTS) suggestion to prefer if(IS_READABLE) 2024-02-06 09:29:11 -05:00
Brad King
23d7863375 Help: Fix cmake_language(EXIT) signature anchor 2024-02-06 09:23:42 -05:00
Brad King
58d424bca1 Merge topic 'add_custom_command-target-alias'
3b07ec631d add_custom_command: Allow adding build event via ALIAS target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9201
2024-02-01 08:32:20 -05:00
Chen Linxuan
3b07ec631d add_custom_command: Allow adding build event via ALIAS target
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2024-02-01 08:21:41 -05:00
Brad King
03206842ff Merge topic 'test-define-prop'
6c3311d53b Help: Document property redefinition semantics
7aacae4e0e Tests: Add unit tests for property redefinition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9136
2024-01-30 11:31:10 -05:00
FeRD (Frank Dana)
6c3311d53b Help: Document property redefinition semantics
Add a section to the `define_property()` documentation which
details the behavior when attempting to redefine an existing
property. (The command is silently ignored.)

Provide an example using `get_property()` to examine a property
definition created with `define_property()`.
2024-01-29 05:23:37 -05:00
Brad King
84dd192326 Merge topic 'doc-configure_file'
682a513bbb Help: Organize configure_file documentation into sections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !9191
2024-01-27 10:10:09 -05:00
Brad King
682a513bbb Help: Organize configure_file documentation into sections 2024-01-26 10:29:57 -05:00
Alex Neundorf
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
These options can be used to specify files which can be used
to restrict the set of tests that will be executed.

Fixes: #25455
2024-01-25 12:38:04 -05:00
leha-bot
1bb1769235 cmake_language: Add EXIT subcommand
Add tests to cover these cases:

* run as regular CMake module, in NORMAL_MODE (expected to fail);
* run as CMake script in SCRIPT_MODE (expected to exit with given code);
* run as CMake script that `include()`-s another script with EXIT subcommand;
* run as CMake script which EVAL-uates EXIT subcommand via
  `cmake_language(EVAL CODE "<cmake code>")`.

Fixes: #23162
2024-01-16 10:41:31 +03:00
Cristian Le
fa00928bcd file: STRINGS + REGEX store match results
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-01-09 16:36:55 -05:00
Brad King
951656385d Merge topic 'doc-get-properties-inherited'
8086badba4 Help: Fix wrong return values for unset inherited properties
1ca5ec67b0 Help: Add missing DIRECTORY keyword to set_tests_properties() signature
34379f005b Help: Use <variable> consistently in property getter commands
29ccc9a4cd Help: Use <xxx> for non-keyword arguments in property command signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9131
2024-01-05 10:18:42 -05:00
Craig Scott
8086badba4
Help: Fix wrong return values for unset inherited properties
Since ff6234509e (Help: Clarify behavior of INHERITED properties, 2018-03-21),
the docs for some get_..._property() commands incorrectly describe
the behavior for inherited properties. When a property is not set, even
in a parent scope, the returned result from the get_..._property()
command is the same whether the property is inherited or not.
The docs incorrectly stated that an empty string would be returned
for inherited properties in such cases.
2024-01-05 17:40:16 +11:00
Craig Scott
1ca5ec67b0
Help: Add missing DIRECTORY keyword to set_tests_properties() signature 2024-01-05 16:45:27 +11:00
Craig Scott
34379f005b
Help: Use <variable> consistently in property getter commands
Property-related commands used a mix of <VAR>, <var>, or
<variable> to specify the variable to store the result in. The <VAR>
form is particularly confusing, since being uppercase it looks more
like a keyword. Use <variable> consistently across all the commands
so that the behavior is clear.
2024-01-05 15:37:39 +11:00
Craig Scott
29ccc9a4cd
Help: Use <xxx> for non-keyword arguments in property command signatures 2024-01-05 15:31:39 +11:00
Brad King
2b4bc8d469 Merge topic 'HELP-string_LENGTH-link-error'
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:14 -05:00
Brad King
f11f0f52b7 Merge topic 'HELP-string_LENGTH-link-error' into release-3.28
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:13 -05:00
Marc Chevrier
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description
Make the link target explicit to avoid ambiguity with `JSON LENGTH`.

Fixes: #25546
2024-01-03 14:14:18 -05:00
Brad King
a350d92c06 Merge topic 'add_test-CROSSCOMPILING_EMULATOR-exclusive'
ca5a300d7f add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8947
2023-12-20 09:09:48 -05:00
Ralf Habacker
ca5a300d7f add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compiling
Add policy CMP0158 to provide compatibility for existing projects.

Fixes: #23672
2023-12-19 10:00:55 -05:00
Craig Scott
d0ab70d57d
Help: Fix typo in dependency provider method keyword
The cmake.vim file is generated by scanning for keyword-like
strings in the docs. Update the corresponding wrong entry
there too directly for now, which will fix the wrong entry until
the next full regeneration of the file.

Fixes: #25503
2023-12-16 10:27:39 +11:00
Brad King
6ba3bb0563 Merge topic 'cmake-test-launcher'
88863d83d6 fileapi: Add test launcher to codemodel-v2
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
b44e38a397 cmFileAPICodemodel: Add missing std::move()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8963
2023-12-15 09:34:20 -05:00
Ralf Habacker
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
2023-12-13 10:20:43 -05:00
Brad King
f522cf4546 Merge topic 'doc-xcframeworks-stubs-apple'
e831eef933 Help: Note case where IMPORTED_IMPLIB isn't needed for (xc)frameworks
01735badee Help: XCFrameworks and stubs are supported on all Apple, not just macOS
6ac50df591 Help: Add missing versionadded directives for IMPORTED_IMPLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9058
2023-12-13 09:34:51 -05:00
Brad King
ef6aec22a1 Merge topic 'doc-xcframeworks-stubs-apple' into release-3.28
e831eef933 Help: Note case where IMPORTED_IMPLIB isn't needed for (xc)frameworks
01735badee Help: XCFrameworks and stubs are supported on all Apple, not just macOS
6ac50df591 Help: Add missing versionadded directives for IMPORTED_IMPLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9058
2023-12-13 09:34:50 -05:00
Brad King
532c30a654 Merge topic 'Help-create_test_sourcelist'
464bc12bb7 Help/create_test_sourcelist: format arguments in the signature docs
131f9c9efa Help/create_test_sourcelist: add formatting markup
8540520902 Help/create_test_sourcelist: reflow prose

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9059
2023-12-12 08:35:07 -05:00
Ben Boeckel
464bc12bb7 Help/create_test_sourcelist: format arguments in the signature docs 2023-12-09 23:15:29 -05:00
Ben Boeckel
131f9c9efa Help/create_test_sourcelist: add formatting markup 2023-12-09 10:17:45 -05:00
Ben Boeckel
8540520902 Help/create_test_sourcelist: reflow prose 2023-12-09 10:17:16 -05:00
Craig Scott
01735badee
Help: XCFrameworks and stubs are supported on all Apple, not just macOS 2023-12-09 16:15:19 +11:00
Brad King
e1519edd91 Help: Use signature directive for the 'add_library' command
This allows individual signatures to be cross-referenced from elsewhere.
It also associates with each signature its main documentation via
indentation.
2023-12-06 13:05:23 -05:00
Brad King
bfc9e71d1f Help: Use signature directive for the 'add_executable' command
This allows individual signatures to be cross-referenced from elsewhere.
It also associates with each signature its main documentation via
indentation.
2023-12-06 13:03:03 -05:00
namniav
7fc6d7247a Help: Fix signature of add_library(<name> INTERFACE EXCLUDE_FROM_ALL)
This signature was added by commit 4391913133 (Add INTERFACE libraries
to generated buildsystem if they have SOURCES, 2020-07-20,
v3.19.0-rc1~346^2~1) with incorrect documentation.

Previously the documented signature as:

    add_library(<name> INTERFACE [<source>...] [EXCLUDE_FROM_ALL])

which is incorrect.  CMake would recognize `EXCLUDE_FROM_ALL` as a source
file and report an error that it doesn't exists.

The correct signature is:

    add_library(<name> INTERFACE [EXCLUDE_FROM_ALL] [<source>...])

which places `EXCLUDE_FROM_ALL` in the same position used by the
documentation of other signatures.

Fixes: #25463
2023-12-04 10:37:01 -05:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Brad King
2c923a7e28 Merge topic 'install-export-xcframework'
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
a90968e044 cmExportBuildFileGenerator: Add structs for target exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8969
2023-11-16 09:13:16 -05:00
Brad King
e48f2e69b5 Help: Clarify file() command multi-value argument placeholders
Use `<placeholder>...` syntax to imply "zero or more", as we do elsewhere.
2023-11-15 10:56:17 -05:00
Kyle Edwards
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
Issue: #25262
2023-11-15 09:10:58 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
Kyle Edwards
e62a3b8625 Help/export: Add signature directives 2023-11-13 11:07:52 -05:00
Brad King
92cc1f3b62 Merge topic 'Ninja-use-depslog'
bb7a0497ef cmTransformDepfile: warn when a depfile is not written to
c22c473bde Tests/Ninja*/CustomCommandDepfile: check that deps are in the database
b0177003e1 cmGlobalNinjaGenerator: tell `ninja` to actually read the depfile
45eff9145e cmAddCustomCommandCommand: use `cmStrCat`
c6445c615b Tests/RunCMake/Ninja: fix subdir prefix check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8911
2023-11-07 09:07:46 -05:00
Ben Boeckel
b0177003e1 cmGlobalNinjaGenerator: tell ninja to actually read the depfile
But only do so if the depfile is not specified as an output of the
command. Otherwise the command will out-of-date itself as `ninja`
deletes depfiles that it incorporates into the database and a missing
output will cause the command to run again.
2023-11-01 14:08:18 -04:00
Marc Chevrier
337bc5662c if(): add operators IS_READABLE, IS_WRITABLE and IS_EXECUTABLE.
Offers possibility to check for file or directory permissions.
2023-11-01 14:53:31 +01:00
Brad King
54e06c601d Help: Replace link with its http redirect 2023-10-19 09:24:41 -04:00
Brad King
dd78592ba1 Merge topic 'try_compile-alias-targets'
8f9f371668 try_compile: Add support for using ALIAS targets
9f8aa94192 Add missing `OUTPUT` in ExportImport test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8877
2023-10-17 10:22:54 -04:00
Cristian Le
8f9f371668 try_compile: Add support for using ALIAS targets
Fixes: #25337
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-16 20:22:23 +02:00
scivision
0f37000304 try_{compile,run}: add LINKER_LANGUAGE option
Fixes: #25326
2023-10-16 11:30:17 -04:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04:00
Brad King
f83790af0b Merge topic 'fileset-private-dep'
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8420
2023-09-21 09:39:56 -04:00
Brad King
51c2927816 Help: Clarify requirements for find_package to use lib{64,32,x32} paths
Issue: #25157
2023-09-20 12:44:00 -04:00
Brad King
e625255fe4 Help: Indent find_package REGISTRY_VIEW paragraphs together
In commit 8d7e80cf3d (find_* commands: add control over Windows registry
views, 2022-04-16, v3.24.0-rc1~201^2) this indentation was used for the
other find commands but was left out for `find_package`.
2023-09-20 12:31:27 -04:00
Martin Duffy
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can
model using file sets.  Add policy CMP0154 to treat generated sources
as private by default in targets with file sets.  Generated public
headers can be specified in public file sets.

Fixes: #24959
Issue: #15555
2023-09-20 10:25:24 -04:00
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
a273b7f5d4 Merge topic 'host-msystem-prefix'
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
cdcff0a0f0 cmCMakeHostSystemInformationCommand: Clarify function names and roles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8788
2023-09-11 12:27:37 -04:00
Brad King
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.

Issue: #24216
2023-09-10 07:33:47 -04:00
Brad King
5924a1f0eb Help: Document if() comparison number format
Fixes: #25237
2023-09-08 10:26:34 -04:00
FeRD (Frank Dana)
bbf3ed5422
Help: Explain block() policy-scope rules more clearly 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
2f319c6484
Help: Remove "this command" ambiguity in set() docs 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
9eecdc7ab7
Help: Use signature directive for cmake_policy() 2023-09-01 21:28:40 +10:00
Brad King
36a0950e94 Merge topic 'doc-cmake_minimum_required-deprecation'
741755f637 Help: Document cmake_minimum_required deprecation of old versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8742
2023-08-21 09:30:23 -04:00
Brad King
741755f637 Help: Document cmake_minimum_required deprecation of old versions
Document the deprecation warnings added by commit 5845c218d7 (Deprecate
compatibility with CMake versions older than 2.8.12, 2020-06-12,
v3.19.0-rc1~629^2) and commit 3a4791548d (Deprecate compatibility with
CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).

Fixes: #25196
2023-08-19 09:03:53 -04:00
scivision
136edadad4 Help:try_run: place options in their own section 2023-08-16 10:06:31 -04:00
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