Commit Graph

122 Commits

Author SHA1 Message Date
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05: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
Ben Boeckel
48ee946fdc cmExperimental: recycle the C++ modules API UUID
Supporting modules on IMPORTED targets is worth an update.
2023-08-17 14:42:54 -04:00
Ben Boeckel
80ef50a191 CXXModules: add a variable for BMI-only compilation
This will be required when dealing with imported targets which contain
modules.
2023-08-17 14:42:54 -04:00
Brad King
438398c8d7 Merge topic 'cmExperimental-uuid-doc'
21c45a81c3 Help/experimental: fix UUID documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8692
2023-08-08 10:08:36 -04:00
Ben Boeckel
21c45a81c3 Help/experimental: fix UUID documentation
This was missed in be53c75852 (cmExperimental: recycle the C++ modules
API UUID, 2023-07-21) from !8639.
2023-08-07 17:40:35 -04:00
Brad King
6828b9df5a Help/dev: Extend documentation guide with another section nesting level 2023-07-31 11:21:10 -04:00
Ben Boeckel
57ef353d22 cmExperimental: refresh the C++ modules UUID
The transitive support for Clang is a change in support for the
ecosystem.
2023-07-13 08:40:22 -04:00
Ben Boeckel
0183e1bca3 cxxmodules: remove CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP variable
It is now subsumed by the UUID setting completely.
2023-06-01 14:43:26 -04:00
Ben Boeckel
7b62a83c6f cxxmodules: update the experimental UUID
Syntactic support for C++ header units has been removed, so a new UUID
is warranted.
2023-05-31 10:57:11 -04:00
Matthew Woehlke
302f5171d8 Utilities/Sphinx: Add 'cref' role
Add a role that can be used to create local links (a la '`LINK`_'), but
that also applies literal style. This is particularly useful for
referring to subcommands within the command's documentation in a style
that is consistent with ':command:`BAR <foo(BAR)>`' but is much less
verbose.

Although this is intended for subcommands, it works with any local
reference.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-03-14 15:20:47 -04:00
Brad King
08d31c227b Merge topic 'smart-wrap-signatures'
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8317
2023-03-14 09:39:52 -04:00
Matthew Woehlke
2e37a20f02 Utilities/Sphinx: Allow explicit target for genex
Split the genex directive into its own class, allowing a slight
simplification of CMakeObject. Add ability to specify an explicit target
name for the same.

Use this to provide a target for the `$<TARGET_PROPERTY:prop>` generator
expression which is otherwise missing one (due to overlap with
`$<TARGET_PROPERTY:tgt,prop>`).  With this one can write:

    :genex:`$<TARGET_PROPERTY:prop> <TARGET_PROPERTY:prop>`

to link the second variant.

Fixes: #24573
2023-03-13 17:04:52 -04:00
Matthew Woehlke
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures
Implement logic to support several styles of parsing in the new
signature directive that control where line breaks are allowed in a
signature.

The default is 'smart', which forbids breaks inside of square- or
angle-brackets. The 'verbatim' option forbids all breaks. In all cases,
breaks are always allowed where a newline appears in the source.

This seems to Just Work for most writers, but HTML needs some special
handling that is accomplished by a new CSS rule and assigning the 'nbsp'
class to spaces that are not allowed to break. (ROFF's line wrapping is
rather unfortunate here, as it prefers splitting and hyphenating words
rather than breaking at a space.)
2023-03-13 13:31:38 -04:00
Matthew Woehlke
cc21d0e478 Utilities/Sphinx: Make signatures linkable
Add signatures to the collection of observed objects (which can be
referenced elsewhere). Don't automatically strip parameters from a
:command: reference, as these may now link signatures. (Do, however,
munge them into 'text <ref>' form if they aren't already, as not doing
so adds an extra '()' for some reason.) Correspondingly, change xref
resolution to try to match 'command' when a ref like 'command(args)' is
not matched, so that existing links to commands that have not been
converted to use the new signature directive don't immediately break.
2023-03-09 11:32:07 -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
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.).  Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
2023-03-03 17:05:02 -05:00
Brad King
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
LLVM/Clang 16.0 now contains official support for what CMake needs.
2023-03-03 12:44:53 -05:00
Brad King
d70582eed8 ccmake: Update minimum required version of CMake for curses check
This should have been part of commit d6b811fb82 (Require CMake 3.13+ to
configure CMake itself, 2022-02-22, v3.24.0-rc1~605^2~1).
2023-03-01 09:15:38 -05:00
Brad King
6e85ad7f8b Help/dev: Add per-directive sections in CMake Documentation Guide 2023-02-24 12:25:35 -05:00
Brad King
53d7d8d4ee Help/dev: Update source code guide to specify clang-format version 15 2023-01-19 09:13:24 -05:00
Ben Boeckel
e84fcbcb0b cxxmodules: support new round of Clang patches
These patches now support the `-MF` output, so remove the `none` support
added just for the old patchset which did not use it.

Also update the flag name to `-fmodule-output=`.

Due to the new Clang module mapper flag, use a new experimental support
UUID as well.
2022-12-15 18:43:47 -05:00
Brad King
f1f064b7b2 Merge topic 'cxx-module-map-clang'
2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules
abd42e9cfc ci: add a Docker container for clang support of C++20 modules
51093f3002 Clang-FindBinUtils: also find `clang-scan-deps`
0b333de923 ci: add C++ module rules file for Clang
21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format
9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes
9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7978
2022-12-06 08:04:18 -05:00
Ben Boeckel
21b9fb1e8c cmCxxModuleMapper: support the clang module map format 2022-12-02 13:01:21 -05:00
Ben Boeckel
2991e92ea7 cmExperimental: recycle C++20 module support UUID
Visual Studio support warrants a new ID.
2022-12-01 11:42:46 -05:00
Ben Boeckel
82833fb3c0 Help/dev/experimental: document C++20 module limitations 2022-12-01 11:42:46 -05:00
Ben Boeckel
12e4bc73cb MSVC: don't opt into dyndep support
Instead, just set the variables for how scanning works since that is
part of the compiler mechanisms.

Fixes: #24198
2022-11-28 18:02:51 -05:00
Ben Boeckel
19fc1ba630 Help/dev/experimental: document the msvc module map format 2022-11-21 18:20:46 -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
Ben Boeckel
d7f5064ff7 cmScanDepFormat: support P1689R5
This adds the `is-interface` key on provides fields.
2022-07-26 12:25:42 -04:00
Ben Boeckel
48502a3781 cmExperimental: update CXX_MODULE_CMAKE_API UUID
The set of features available has been expanded, so update the UUID.
2022-07-06 10:15:23 -04:00
Ben Boeckel
386465bf83 cmTarget: add support for C++ module fileset types
C++ modules have two variants which are of importance to CMake:

  - `CXX_MODULES`: interface modules (those using `export module M;`,
    `export module M:part;`, or `module M:internal_part;`)
  - `CXX_MODULE_HEADER_UNITS`: importable header units

Creating C++ modules or partitions are *not* supported in any other
source listing. This is because the source files must be installed (so
their scope matters), but not part of usage requirements (what it means
for a module source to be injected into a consumer is not clear at this
moment). Due to the way `FILE_SET` works with scopes, they are a perfect
fit as long as `INTERFACE` is not allowed (which it is not).
2022-06-16 10:28:34 -04:00
Ben Boeckel
ff30a5397d cmExperimental: add an experimental feature to handle C++ modules 2022-06-14 19:27:30 -04:00
Marc Chevrier
95a1b2c7b8 stl containers: enhance compatibility with C++14, C++17 and C++20
* Ensure various functions working with containers are available through
all headers as specified by the standard.
* Add C++20 std::ssize() function.
2022-05-07 11:04:06 +02:00
Brad King
386496a544 Merge topic 'cpp-modules-prep'
c5b56b35c2 cmInstallExportGenerator: expose the temporary directory
c107760417 cmNinjaTargetGenerator: support msvc-style deps discovery for scanning
64c15ec018 cmNinjaTargetGenerator: add flags for scanning based on the fileset type
aaa18f15cf cmTarget: add support for querying all file set names
cc4e19710d cmGlobalNinjaGenerator: use an extention based on the modmapfmt
97a68198c9 cmGlobalNinjaGenerator: escape `:` in module names
499009b79c cmTarget: avoid creating export entries if they don't exist
0513a1fe10 cmInstallGenerator: use CMake-private variables in generated code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7214
2022-05-03 11:20:26 -04:00
Ben Boeckel
c107760417 cmNinjaTargetGenerator: support msvc-style deps discovery for scanning 2022-04-27 18:39:01 -04:00
Ben Boeckel
64c15ec018 cmNinjaTargetGenerator: add flags for scanning based on the fileset type 2022-04-27 15:14:50 -04:00
Marc Chevrier
b13eef5a90 cm::enum_set: container that contains a set of unique enum values.
The enum must be an `enum class` with an unsigned integer as base type.
2022-04-27 19:40:40 +02:00
Brad King
b20a19fca1 Merge branch 'backport-3.22-ci-package-uploads' into ci-package-uploads 2022-04-04 13:26:19 -04:00
Brad King
cb44e0d47c gitlab-ci: distinguish release and development pipeline schedules
Redefine the `CMAKE_CI_PACKAGE` pipeline schedule variable to
indicate whether it is for a development version (`dev`) or a
release version (`v[0-9]...`).  Use this to automatically turn
package upload jobs on or off without having to edit the jobs
in `.gitlab-ci.yml` for release branches.
2022-04-04 13:23:37 -04:00
Brad King
bd11d78dfc Help/dev: Clarify maintainer guide step for DEVEL_CMAKE_VERSION
The previous wording could be misread as ensuring the arguments to the
call match the release version.  Clarify that one needs to remove the
call and replace it with the literal release version string.
2022-02-04 06:48:58 -05:00
Brad King
74f1fbb7a1 Help/dev: Cover module function naming in CMake Documentation Guide 2021-12-08 17:05:25 -05:00
Ben Boeckel
7d5828e293 gitlab-ci: shorten job prefixes
This helps to maximize the amount of information visible in the GitLab
web interface.

Also document their meaning in the developer documentation and in the CI
configuration file directly.

See: https://gitlab.com/gitlab-org/gitlab/-/issues/8496
2021-11-23 10:11:25 -05:00
Ben Boeckel
054754359a cmRST: support versionadded and versionchanged directives
This makes `versionadded` and `versionchanged` directives show up in
`cmake --help-*` output instead of disappearing (and potentially making
empty sections).

Fixes: #22808
2021-10-27 09:15:00 -04:00
Brad King
cf22263531 Help/dev/experimental: Link to published P1689R4 2021-06-28 09:58:52 -04:00
Ben Boeckel
3e5b609547 cmScanDepFormat: P1689R4: Make work-directory optional 2021-06-09 11:02:25 -04:00
Ben Boeckel
aab9a5fc3e cmScanDepFormat: P1689R4: Factor out primary-output field 2021-06-09 10:51:02 -04:00
Ben Boeckel
82c867ad85 cmScanDepFormat: P1689R4: Flatten future-compile members into parent 2021-06-09 10:50:41 -04:00
Brad King
bd12b97d05 cmScanDepFormat: Drop unused "outputs", "inputs", and "depends" fields
These fields are specified by our `P1689r3` paper, but are not actually
needed.  The dependencies of the scanning results themselves can be
captured via normal depfile logic.  Avoid saving this possibly-large
information in the scanning results.  It is not needed by later steps.
2021-05-13 08:33:00 -04:00
Smit tay
b82052feb8 Help/dev/review: Clarify instructions to update existing merge requests 2021-05-03 12:15:27 -04:00