Commit Graph

147 Commits

Author SHA1 Message Date
Matthew Woehlke
5236984a08 Help: Describe CPS support in find_package
Update find_package documentation to describe (the current state of)
support for Common Package Specification packages. Make some general
improvements to the same while we're at it. Add documentation blurb for
the experimental flag that enables CPS support.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
b4704d3ef8 Help/dev: Improve coding conventions guide
Improve the coding conventions specified in our source code guide:

- Recommend capitalization for locals as well as members.

- Remove exceptions for `const` placement; new code should always prefer
  "east" style.

- Remove separate section; "Code Style" and "Code Conventions" are
  similar enough to not need to make a distinction.
2024-12-10 14:18:08 -05:00
Brad King
24d97da543 Help/dev: Add some coding conventions to source code guide 2024-12-06 14:07:32 -05:00
Brad King
36f6fa8737 Merge topic 'doc-rel-3.31'
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9904
2024-10-15 13:57:27 -04:00
Brad King
0eb871b856 Merge topic 'doc-rel-3.29'
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:54:55 -04:00
Brad King
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option
In commit 0f37000304 (try_{compile,run}: add LINKER_LANGUAGE option,
2023-10-12, v3.29.0-rc1~567^2) a release note was accidentally added in
the wrong directory and so was not included in the 3.29 release notes.
2024-10-15 13:30:04 -04:00
Peter Kokot
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option
In commit 95323c90a1 (file(MAKE_DIRECTORY): Add optional RESULT keyword
to capture failure., 2024-06-16, v3.31.0-rc1~414^2) the release note was
added in the wrong directory so it was not gathered for the 3.31 release.

Fixes: #26377
2024-10-15 13:27:30 -04:00
Brad King
dc48a4556b Merge topic 'post-rel-dev'
3a96346a3f Configure CMake itself with policies through CMake 3.30
10f8c6a274 export: Increase maximum policy version in exported files to 3.30
fe6cf6d28c Add deprecation warnings for policies CMP0139 and below
b51e6a0be7 Help/dev: Update export policy version in post-release development

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9892
2024-10-11 09:16:14 -04:00
Brad King
b51e6a0be7 Help/dev: Update export policy version in post-release development
Since commit 20fa4ce8d8 (export: Factor out CMake-specific export
generation (2/2), 2024-07-18) the code that needs editing is in a
different method.
2024-10-09 14:31:50 -04:00
Brad King
b866eb8458 Help/dev: Add maintainer guide release branch creation to use a MR for CI
Provide a way to run CI with a new release version number
before merging it.
2024-10-09 11:59:51 -04:00
Ben Boeckel
e77655555c cmExperimental: gate build database support behind a flag
Given that the feature currently only supports C++ sources and is not
formally accepted by ISO yet, gate it behind a flag.
2024-09-03 10:05:40 -04:00
Matthew Woehlke
3d52d70b84 export: Add initial CPS support
Add initial support for exporting (install only, for now) Common Package
Specification (https://cps-org.github.io/cps/) format package
descriptions. This has some limitations, such as not supporting
generator expressions (as these cannot be portably exported), and only
partially supporting transitive dependencies, but should be usable for
at least some simple cases. (Actually, $<LINK_ONLY> is theoretically
supportable, but is not yet implemented.)

This still needs tests; these will be added in the next commit. Other
potential improvements include support for language-specific compile
definitions and inferring some package properties from project
properties. Additionally, there is no module support yet; this is partly
pending on having a tool agnostic format for providing the necessary
information.
2024-08-14 15:25:27 -04:00
Vito Gamberini
e0f9d81f09 STL: extend type_traits to deal with member pointers 2024-07-02 09:30:55 -04:00
Asit Dhal
95323c90a1 file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure.
Fixes: #26041
2024-06-24 02:20:43 +02:00
Brad King
8a688e556e Help/dev: Add a CMake Testing Guide
Document how developers working on CMake itself may run the test suite
locally.

Fixes: #26001
2024-06-05 12:58:47 -04:00
Brad King
7cc124d4b5 Help/dev: Move integration testing to a more-specific document
Avoid breaking existing links to `Help/dev/testing.rst` by keeping
the document with minimal text to direct readers to the new one.
2024-06-05 12:58:47 -04:00
Brad King
d9ab1fb5da Help/dev: Fix formatting in CMake Documentation Guide 2024-06-05 12:58:47 -04:00
Ben Boeckel
a46395df06 importstd: clarify when the experimental UUID must be available
Fixes: #25980
2024-05-15 07:15:05 -04:00
Ben Boeckel
15bbd1d9b8 Experimental: add an experimental feature gate for import std 2024-04-12 11:46:39 -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
scivision
53a542936e Help: Convert http URLs to https 2024-03-07 09:42:45 -05:00
Brad King
a61efbb7b1 Help/dev: Add informal governance section to maintainer guide
Document the status quo w.r.t. governance.
2023-12-06 10:27:11 -05:00
Gold856
4567c8205a Help/dev: Update UseJava export policy version in post-release development 2023-11-27 09:38:48 -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
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
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