summaryrefslogtreecommitdiffstats
path: root/Help/dev
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2019-03-12 19:36:12 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-05 14:35:10 (GMT)
commit39cbbb59a52c63cd90eebaecea64fd42c3fad1d8 (patch)
tree0d78344c83683a5b306087f438fcd8680275c2d8 /Help/dev
parent791b4d26d6cbcb69615ddfbd1872a34a2e214b39 (diff)
downloadCMake-39cbbb59a52c63cd90eebaecea64fd42c3fad1d8.zip
CMake-39cbbb59a52c63cd90eebaecea64fd42c3fad1d8.tar.gz
CMake-39cbbb59a52c63cd90eebaecea64fd42c3fad1d8.tar.bz2
ninja: add experimental infrastructure to generate gcc-format modmap files
Diffstat (limited to 'Help/dev')
-rw-r--r--Help/dev/experimental.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Help/dev/experimental.rst b/Help/dev/experimental.rst
index 4cf1c62..d019161 100644
--- a/Help/dev/experimental.rst
+++ b/Help/dev/experimental.rst
@@ -45,6 +45,26 @@ Compiler writers may try out their scanning functionality using
the `cxx-modules-sandbox`_ test project, modified to set variables
as above for their compiler.
+For compilers that generate module maps, tell CMake as follows:
+
+.. code-block:: cmake
+
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc")
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG
+ "${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>")
+
+Currently, the only supported format is ``gcc``. The format is described in
+the GCC documentation, but the relevant section for the purposes of CMake is:
+
+ A mapping file consisting of space-separated module-name, filename
+ pairs, one per line. Only the mappings for the direct imports and any
+ module export name need be provided. If other mappings are provided,
+ they override those stored in any imported CMI files. A repository
+ root may be specified in the mapping file by using ``$root`` as the
+ module name in the first active line.
+
+ -- GCC module mapper documentation
+
.. _`D1483r1`: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html
.. _`P1689r3`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1689r3.html
.. _`cxx-modules-sandbox`: https://github.com/mathstuf/cxx-modules-sandbox