Commit Graph

93 Commits

Author SHA1 Message Date
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
Ben Boeckel
f71e7b8156 Help/dev/review: mention --pretty=reference
This was added in Git 2.25 (13 Jan 2020).
2021-04-07 12:28:57 -04:00
Brad King
7d498d6b43 Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions:

    :genex:`SOME_GENEX`
    :genex:`$<SOME_GENEX>`
    :genex:`$<SOME_GENEX:...>`

and definition of CMake generator expressions via a directive:

    .. genex:: SOME_GENEX
    .. genex:: $<SOME_GENEX>
    .. genex:: $<SOME_GENEX:...>

It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
2021-01-18 12:35:41 -05:00
Brad King
cc1f53351c Help/dev: Mention 'cpack_gen' domain object in CMake Documentation Guide
This was accidentally left out of commit 2a2829cc75 (Help: Add new
section for CPack generators, 2018-06-15, v3.13.0-rc1~394^2~3).
2021-01-18 12:35:40 -05:00
Brad King
954a9e9893 Help/dev: Mention 'envvar' domain object in CMake Documentation Guide
This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19,
v3.12.0-rc1~200^2~1).
2021-01-18 12:35:40 -05:00
Ben Boeckel
39cbbb59a5 ninja: add experimental infrastructure to generate gcc-format modmap files 2021-01-05 09:35:10 -05:00
Brad King
4b23359117 ninja: Add experimental infrastructure for C++20 module dependency scanning
Optionally enable this infrastructure through an undocumented
`CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variable.  Currently this is
experimental and intended for use by compiler writers to implement their
scanning tools.  Warn as such when the feature is activated.  Later when
compilers provide the needed scanning tools we can enable this variable
from our corresponding compiler information modules.  It is never meant
to be set by project code.

When enabled, generate a build graph similar to what we use for Fortran
module dependencies.  There are some differences needed because we can
scan dependencies without explicit preprocessing, and can directly
compile the original source afterward.

Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
2021-01-05 09:34:55 -05:00
Brad King
d231d92289 Help/dev: Add a CMake Experimental Features Guide
Initialize it with placeholder content.  This document will serve to
contain documentation for experimental features that are under
development and not yet included in official documentation.
2020-11-24 16:29:34 -05:00
Brad King
8b13f1a527 Help/dev: Add maintainer guide step for post-release policy updates 2020-10-13 14:44:09 -04:00
Brad King
7074b4c08c Help/dev: Add maintainer guide steps for CI packaging pipeline updates 2020-10-01 12:16:24 -04:00
Kyle Edwards
5585e8575b Help: Add note about #pragma once 2020-09-03 09:30:27 -04:00
Brad King
e05b200be2 Help/dev: Update CMake Review Process document to suggest 'git describe'
Using `git describe --contains` is the preferred way to reference a
commit relative to a tag.
2020-08-20 07:29:06 -04:00
Jean-Christophe Fillion-Robin
207373802e Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme

The following command was used:

```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Marc Chevrier
d654bf3449 STL Support: Add cm::filesystem::path in <cm/filesystem> 2020-07-09 17:02:42 +02:00
Marc Chevrier
4408f34cfe STL Support: Add function cm::quoted in <cm/iomanip> 2020-07-09 15:24:43 +02:00
Brad King
0c87afceab Help/dev: Add maintainer guide step for 'versionadded' documentation markup 2020-07-06 10:11:24 -04:00
Brad King
9710790a39 Help/dev: Add maintainer guide step for initial post-release development
Document steps for deprecating old policy settings and future-proofing
export files generated by `install(EXPORT)`.
2020-06-13 11:44:04 +10:00
Ben Boeckel
131b8cc8ae Help/dev: document other arguments to Do: test 2020-06-09 11:12:05 -04:00
Brad King
855ed80111 Help/dev: Update CMake Review Process document for GitLab CI
We have replaced use of `buildbot` with GitLab CI.  Update the
relevant section of our review process documentation.
2020-06-09 07:54:22 -04:00
Brad King
eb705b9531 Update links to gitlab.kitware.com repos to add -/
GitLab now uses a `/-/` component between the `group/project` part of
the URL and the `{issues,merge_requests,tree}` part so that it can
support `group/subgroup/project` with arbitrary depth.
2020-05-26 11:38:01 -04:00
Marc Chevrier
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Marc Chevrier
aacd4e4a90 Refactoring: add cm::contains to <cmext/algorithm> 2020-04-17 10:00:03 +02:00
Marc Chevrier
a4ca1792f6 Help: Update CMake source developer guide for C++ standard library usage
We now offer many C++14, C++17, C++20, and custom extensions to the C++
standard library that are available even when compiling as C++11.
2020-03-14 12:40:13 +11:00
Brad King
75a5d1d4b1 Help/dev: Document "Backport:" footer for MR descriptions 2019-11-11 23:24:29 +11:00
Brad King
12fd957ce3 Help/dev: Add 'external-discussion' to the main workflow status list
This was accidentally left out of commit 49f5b6f7bf (Help: Document the
expire and external discussion resolve states, 2019-05-26,
v3.15.0-rc1~35^2).
2019-11-06 12:02:23 -05:00
Brad King
2fae9101e5 Help/dev: Update maintainer guide for Discourse transition
Replace the post-release development announcement to the mailing list
with a post to the appropriate category on `discourse.cmake.org`.
2019-11-05 13:41:33 -05:00
Brad King
bf832ccf01 Utilities/Release: Add README.rst describing directory content 2019-08-23 13:31:54 -04:00
Brad King
4542ec239a Help/dev: Add release commit instructions to maintainer guide 2019-07-26 14:34:09 -04:00
Brad King
eb5ea5a505 CMakeVersion: Use '-rc0' version suffix on release branches prior to rc1
Revert the change from commit 7b354baad5 (CMakeVersion: Set
CMake_VERSION_RC to 0 even in non-rc versions, 2019-07-25) and instead
define a `0` value in `CMake_VERSION_RC` to mean `-rc0`.  This
distinguishes release branch versions prior to the first release
candidate from the first release candidate itself.  It also makes room
for a dedicated "CMake $major.$minor.0-rc1" release commit for `-rc1` as
we have for later release candidates and final releases.
2019-07-26 08:08:30 -04:00
Brad King
7b354baad5 CMakeVersion: Set CMake_VERSION_RC to 0 even in non-rc versions
The logic that uses this value already ignores any "false" value, so `0`
is just as good as not being set at all.  Using `0` for this role makes
the version components look more symmetric and reduces the number of
edits needed when creating releases.
2019-07-25 09:23:48 -04:00