Commit Graph

1453 Commits

Author SHA1 Message Date
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
Craig Scott
5b21897c6e
Help: Remove stray formatting for try_compile() LINKER_LANGUAGE keyword 2024-03-22 20:58:32 +11: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
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
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
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
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
Ben Boeckel
b03356f954 Help/add_custom_command: fix verb grammo 2024-02-28 13:21:52 -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