diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-09-22 17:54:09 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-10-02 14:17:31 (GMT) |
commit | 68caec9137f47fda219995db7cfdf588886c84a1 (patch) | |
tree | 6aa86e74943c59b444f0e1eb636c30a68d67dcec | |
parent | 6bb05172acc8519a174a4f6294dd96d82c846d4c (diff) | |
download | CMake-68caec9137f47fda219995db7cfdf588886c84a1.zip CMake-68caec9137f47fda219995db7cfdf588886c84a1.tar.gz CMake-68caec9137f47fda219995db7cfdf588886c84a1.tar.bz2 |
Help: add a manpage for cxxmodule support
-rw-r--r-- | Help/index.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-cxxmodules.7.rst | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/Help/index.rst b/Help/index.rst index 16c8f25..ca03213 100644 --- a/Help/index.rst +++ b/Help/index.rst @@ -58,6 +58,7 @@ Reference Manuals /manual/cmake-commands.7 /manual/cmake-compile-features.7 /manual/cmake-configure-log.7 + /manual/cmake-cxxmodules.7 /manual/cmake-developer.7 /manual/cmake-env-variables.7 /manual/cmake-file-api.7 diff --git a/Help/manual/cmake-cxxmodules.7.rst b/Help/manual/cmake-cxxmodules.7.rst new file mode 100644 index 0000000..91acae1 --- /dev/null +++ b/Help/manual/cmake-cxxmodules.7.rst @@ -0,0 +1,55 @@ +.. cmake-manual-description: CMake C++ Modules Support Reference + +cmake-cxxmodules(7) +******************* + +.. versionadded:: 3.28 + +C++ 20 introduced the concept of "modules" to the language. The design +requires build systems to order compilations among each other to satisfy +``import`` statements reliably. CMake's implementation asks the compiler +to scan source files for module dependencies during the build, collates +scanning results to infer ordering constraints, and tells the build tool +how to dynamically update the build graph. + +Compiler Support +================ + +Compilers which CMake natively supports module dependency scanning include: + +* MSVC toolset 14.34 and newer (provided with Visual Studio 17.4 and newer) +* LLVM/Clang 16.0 and newer +* GCC 14 (for the in-development branch, after 2023-09-20) and newer + +Generator Support +================= + +The list of generators which support scanning sources for C++ modules include: + +- :generator:`Ninja` +- :generator:`Ninja Multi-Config` +- :generator:`Visual Studio 17 2022` + +Limitations +----------- + +There are a number of known limitations of the current C++ module support in +CMake. This does not document known limitations or bugs in compilers as these +can change over time. + +For all generators: + +- Header units are not supported. +- No builtin support for ``import std;`` or other compiler-provided modules. + +For the Ninja Generators: + +- ``ninja`` 1.11 or newer is required. + +For the :ref:`Visual Studio Generators`: + +- Only Visual Studio 2022 and MSVC toolsets 14.34 (Visual Studio + 17.4) and newer. +- No support for exporting or installing BMI or module information. +- No diagnosis of using modules provided by ``PRIVATE`` sources from + ``PUBLIC`` module sources. |