Commit Graph

1258 Commits

Author SHA1 Message Date
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
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
Matthew Woehlke
0f28653ba9 try_compile: Rename SOURCE_FROM_ARG -> SOURCE_FROM_CONTENT
Change the SOURCE_FROM_ARG keyword to try_compile to SOURCE_FROM_CONTENT
(which we can do because it was recently added and hasn't been in a
release yet). The new name should be clearer as to what it does, and
also more consistent with the CONTENT arguments to some other commands.

Also, fix a typo in an error message.
2022-09-30 14:50:25 -04:00
Matthew Woehlke
09b3051524 try_compile: Add NO_CACHE option (also try_run)
Add NO_CACHE option to try_compile and try_run, which places the results
in regular, rather than cache, variables.

Issue: #22799
2022-09-28 13:41:11 -04:00
Brad King
164a156c7c Merge topic 'remove-vs10-generator'
8d6f015d59 Drop Visual Studio 10 2010 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7718
2022-09-27 10:32:11 -04:00
Brad King
50b668ddc8 Merge topic 'add_subdirectory_system'
2eb30a7036 add_subdirectory: Add SYSTEM option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7399
2022-09-27 10:28:49 -04:00
Brad King
8d6f015d59 Drop Visual Studio 10 2010 generator
This generator has been deprecated since CMake 3.22.  Remove it.
2022-09-26 15:43:04 -04:00
Da Quexian
2eb30a7036 add_subdirectory: Add SYSTEM option
Fixes: #22401
Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-09-26 10:56:54 -04:00
Brad King
98aef0929f Merge topic 'try_compile-source-from'
611d801790 try_compile: Add SOURCE_FROM_FILE
a04eaf6742 Tests: Clean up and simplify TryCompile tests
cb14ae2b87 try_compile: Add SOURCE_FROM_{ARG,VAR}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7700
2022-09-23 08:52:13 -04:00
Matthew Woehlke
611d801790 try_compile: Add SOURCE_FROM_FILE
Add ability to copy try_compile (and try_run) source files from
arbitrary locations into the operation directory. This is included for
the sake of completion and consolidation, although use cases which
actually require this may be rare.
2022-09-22 14:56:50 -04:00
Matthew Woehlke
cb14ae2b87 try_compile: Add SOURCE_FROM_{ARG,VAR}
Add ability to "feed" try_compile (and try_run) sources more directly,
either from literal content, or from a CMake variable which contains
literal content. This saves the user from needing a separate step to
write the content to a file, and allows for the sources to only exist in
the scratch directory.
2022-09-22 13:33:27 -04:00
Hinell
37381506dc Help: Link from add_custom_target to policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Apply the change from commit 00b788e85e (Help:custom_command: link
policy on BYPRODUCTS, 2022-09-09) to `add_custom_target` docs too.

Issue: #23786
2022-09-19 12:39:29 -04:00
Brad King
71cfcbe816 Merge topic 'transitive-usage-reqs-lnks'
3d31f99b74 Help: Link from usage requirement commands to detailed explanation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7653
2022-09-19 10:24:15 -04:00
Brad King
e9d9cd348c Merge topic 'help-add-custom-comman-byproducts'
00b788e85e Help:custom_command: link policy on BYPRODUCTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7662
2022-09-19 10:23:02 -04:00
Hinell
3d31f99b74 Help: Link from usage requirement commands to detailed explanation
Augment vague mentions of "Transitive Usage Requirements" with links to
a detailed explanation.

Fixes: #23799
2022-09-16 10:54:27 -04:00
Hinell
00b788e85e Help:custom_command: link policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Fixes: #23786
2022-09-16 10:50:46 -04:00
Matthew Woehlke
56ae40cc59 try_compile: Add PROJECT keyword-dispatched signature
Introduce a new signature for the project flavor of try_compile (and
try_run) which removes the `bindir` argument and adds a required PROJECT
tag. This is similar to the SOURCES flavor added by commit aa9220d3
(try_compile: Add keyword-dispatched signature, 2022-09-02).
2022-09-14 16:35:50 -04:00