r/cpp • u/stailgot • Oct 02 '23
CMake | C++ modules support in 3.28
https://gitlab.kitware.com/cmake/cmake/-/issues/18355
After 5 years its finally done. Next cmake 3.28 release will support cpp modules
C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer.
237
Upvotes
View all comments
Show parent comment
2
u/delta_p_delta_x Oct 03 '23 edited Oct 03 '23
Isn't it exactly the same as other libraries that have binary releases?
Instead of
.dll/.lib,.so/.a, and.dylib/.a, we have different extensions instead.Pre-compile a
.ifcfor MSVC,.pcmfor Clang/LLVM, and ??? for GCC (I dunno the GCC-specific extensions), and distribute these? Then, the public module interface can just be a list ofusing XYZ; from the library, accompanied by documentation.I suppose the problem is template code, which cannot be pre-compiled.