You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMake has landed experimental support for using the Standard modules.
This will be part of the CMake 3.30 release. This updates the build
instructions to use modules with CMake.
The changes have been tested locally.
---------
Co-authored-by: Will Hawkins <[email protected]>
@@ -146,7 +152,6 @@ This is a small sample program that uses the module ``std``. It consists of a
146
152
147
153
set(CMAKE_CXX_STANDARD 23)
148
154
set(CMAKE_CXX_STANDARD_REQUIRED YES)
149
-
# Libc++ doesn't support compiler extensions for modules.
150
155
set(CMAKE_CXX_EXTENSIONS OFF)
151
156
152
157
#
@@ -214,6 +219,64 @@ Building this project is done with the following steps, assuming the files
214
219
215
220
``error: module file _deps/std-build/CMakeFiles/std.dir/std.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch]``
216
221
222
+
223
+
Using the installed modules
224
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
225
+
226
+
CMake has added experimental support for importing the Standard modules. This
227
+
is available in the current nightly builds and will be part of the 3.30
228
+
release. Currently CMake only supports importing the Standard modules in C++23
229
+
and later. Enabling this for C++20 is on the TODO list of the CMake
230
+
developers.
231
+
232
+
The example uses the same ``main.cpp`` as above. It uses the following
0 commit comments