Commit Graph

6530 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
a27663621f Merge topic 'cxxmodules-doc-msvc-modmapfmt'
19fc1ba630 Help/dev/experimental: document the `msvc` module map format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7944
2022-11-22 09:51:59 -05: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
Ben Boeckel
19fc1ba630 Help/dev/experimental: document the msvc module map format 2022-11-21 18:20:46 -05:00
Brad King
dae70fa7e8 Merge topic 'help-remove-self-reference-links'
eb77695e25 Help: clean up some minor typos
c36910476a Help: remove links from pages to themselves
391c53a851 Help/prop_tgt/LINK_OPTIONS: fix `:genex:` reference
de4909ea16 Help: fix some minor markup errors
c42c77b020 Help/CMAKE_GLOBAL_AUTORCC_TARGET_NAME: fix link reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7940
2022-11-21 10:07:07 -05:00
Brad King
e69251c828 Merge topic 'xcode-ios-extensionkit'
b99c386122 Xcode: Allow bundling extensionkit extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7900
2022-11-21 10:06:20 -05:00
Brad King
55e3168dc4 Merge topic 'lang-std-flag-order'
a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7931
2022-11-21 10:03:35 -05:00
Brad King
fa7afe5eb3 Merge topic 'cxx-scanning-properties'
a02d792c6e cxxmodules: add properties to control scanning
008c09d6db cmNinjaTargetGenerator: factor out determining the fileset of a source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7935
2022-11-21 10:00:12 -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
Russell Greene
b99c386122 Xcode: Allow bundling extensionkit extensions
Fixes: #24150
2022-11-18 13:58:03 -06:00
Ben Boeckel
eb77695e25 Help: clean up some minor typos 2022-11-18 14:11:04 -05: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
Ben Boeckel
391c53a851 Help/prop_tgt/LINK_OPTIONS: fix :genex: reference 2022-11-18 14:09:09 -05:00
Ben Boeckel
de4909ea16 Help: fix some minor markup errors 2022-11-18 14:09:08 -05:00
Brad King
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
Previously we added the language standard flag near the end of all
options, even after those added by `add_compile_options` and friends.
However, on some compilers such as MSVC, the `-std` flag may reset
defaults for flags that precede it on the command line.  Move the
language standard flag to before all other flags that CMake adds for
other abstractions, and before those added by `add_compile_options`.

`CMAKE_<LANG>_FLAGS` should still precede the language flags though,
because they are meant to be treated as language-wide modifications to
the compiler defaults, similar to `$CC $CFLAGS`.

Fixes: #23860
Fixes: #24170
2022-11-18 11:44:52 -05:00
Ben Boeckel
c42c77b020 Help/CMAKE_GLOBAL_AUTORCC_TARGET_NAME: fix link reference 2022-11-18 10:47:39 -05:00
Brad King
4391808712 Merge topic 'file-COPY_FILE-retry'
d34986036f ExternalData: Improve robustness on Windows to copy a data object to a file
efa9eec040 file(COPY_FILE): Add option to retry on Windows if input access fails
fa518188d8 cmSystemTools: Remove unused CopySingleFile overload

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7934
2022-11-18 09:40:13 -05:00
Brad King
e558beeef6 Merge topic 'build-local-interface-genex'
38cbf5e15b Genex: Add $<BUILD_LOCAL_INTERFACE:...> genex
37b5c78688 cmGeneratorExpression: Refactor stripExportInterface() to use enum class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7919
2022-11-18 09:27:35 -05:00
Brad King
1cc936f314 Merge topic 'genex-TARGET_PROPERTY-scope'
8437141b53 Genex: Fix TARGET_PROPERTY lookup scope in transitive usage requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !7928
2022-11-18 09:25:43 -05:00
Ben Boeckel
a02d792c6e cxxmodules: add properties to control scanning
The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for
targets and for source files rather than assuming "C++20 always needs to
be scanned".
2022-11-18 07:54:31 -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
Kyle Edwards
38cbf5e15b Genex: Add $<BUILD_LOCAL_INTERFACE:...> genex
Fixes: #23209
2022-11-17 09:31:27 -05:00
Brad King
8437141b53 Genex: Fix TARGET_PROPERTY lookup scope in transitive usage requirements
When `$<TARGET_PROPERTY:tgt,prop>` is used in an `INTERFACE_*` target
property for usage requirements, it may be evaluated in the context of a
dependent target in another directory.  Look up the `tgt` name in the
directory of the target whose property holds the expression so that
imported targets isolated to that directory are visible.

Fixes: #24163
2022-11-17 07:57:21 -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
Brad King
eda68d229d Merge topic 'cmake-E-copy-t-mode'
8d9069e5b6 cmake -E copy: Add support for -t argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7913
2022-11-15 09:14:07 -05:00
Brad King
82e49021fe Merge topic 'top-level-command-order'
59573bf5b9 project: Warn at top-level if `cmake_minimum_required` wasn't called
23f3dd9f7c RunCMake/project: Ignore exact line number in stderr checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7902
2022-11-15 08:51:20 -05:00
Kyle Edwards
8d9069e5b6 cmake -E copy: Add support for -t argument
Fixes: #23543
2022-11-15 07:47:07 -05:00
Brad King
38c8866dd1 Merge topic 'msvc-19.34-cpp-modules'
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7745
2022-11-14 10:18:21 -05:00
Ben Boeckel
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental
Visual Studio 17.4 now contains official support for what CMake needs.
2022-11-11 16:54:05 -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
968224484f Help: Drop unused PROPERTY_GENEX replace from prop_tgt/INTERFACE_* files 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
Ilia K
3166547cf6 ASM_MARMASM: Add support for Microsoft ARM assembler language
https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference

Fixes: #23999
2022-11-09 10:22:46 -05:00
Brad King
16cb04dbe9 Merge topic 'file-set-file-api'
b3e9fb67bb file-api: support exporting file set information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7867
2022-11-09 09:34:40 -05:00
Brad King
9758dbd9d4 Merge topic 'use_folders_on_by_default'
d3acd22380 USE_FOLDERS: Treat as on by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Amir Masoud Abdol <amirmasoudabdol@icloud.com>
Merge-request: !7830
2022-11-08 14:28:21 -05:00
Ben Boeckel
b3e9fb67bb file-api: support exporting file set information
This includes listing the filesets themselves as well as which file set
(if any) each source file is associated with.

Fixes: #24128
2022-11-08 10:07:10 -05:00
Juan Ramos
d3acd22380 USE_FOLDERS: Treat as on by default
Add a policy to treat the `USE_FOLDERS` global property as ON by default
if it is not set.

Fixes: #21695
2022-11-08 09:32:18 -05:00
Brad King
dab81ced1b Merge topic 'sphinx-linkcheck'
a89c76a773 Build: Add `SPHINX_LINKCHECK` build option
137b00cda1 Build: Do not redirect `sphinx-build` output if CMake running in verbose mode
d954fb8a60 Build: Deduplicate `add_custom_command()` calls for Sphinx targets
2af8724485 Merge branch 'backport-sphinx-linkcheck' into sphinx-linkcheck
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
ac5295a9de Help: Fix broken external links found by sphinx linkcheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7876
2022-11-08 09:02:31 -05:00
Brad King
c30cd5fef1 Merge topic 'sphinx-linkcheck' into release-3.25
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
ac5295a9de Help: Fix broken external links found by sphinx linkcheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7876
2022-11-08 09:02:30 -05: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
Brad King
3b6395da48 Merge topic 'doc-msvc-abi'
128c414a56 Help: Clarify compilers affected by MSVC ABI abstractions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7881
2022-11-08 08:16:44 -05:00
Brad King
db24442007 Merge topic 'doc-msvc-abi' into release-3.25
128c414a56 Help: Clarify compilers affected by MSVC ABI abstractions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7881
2022-11-08 08:16:43 -05:00
Brad King
22c39edd9d Merge topic 'tasking_update_toolset_doc'
beade1cb42 Tasking: Update CMAKE_TASKING_TOOLSET documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7880
2022-11-08 08:13:23 -05:00
Brad King
f3a4c73c68 Merge topic 'tasking_update_toolset_doc' into release-3.25
beade1cb42 Tasking: Update CMAKE_TASKING_TOOLSET documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7880
2022-11-08 08:13:22 -05:00