cmake-init icon indicating copy to clipboard operation
cmake-init copied to clipboard

C++ modules

Open friendlyanon opened this issue 3 years ago • 7 comments

This issue is just for tracking the progress of modules.

At the moment, no generally available compiler seems to properly support modules.

CMake is also designing its API to properly integrate C++ modules: https://discourse.cmake.org/t/api-design-c-modules-source-listings-and-interface-properties/5389

friendlyanon avatar Apr 17 '22 11:04 friendlyanon

Starting with CMake v3.28 the Module support in stable.

MS VC 2022 und clang-17 are fully working.

ClausKlein avatar Feb 26 '24 06:02 ClausKlein

Based on comments in https://old.reddit.com/r/cpp/comments/1b0zem7/what_is_the_state_of_modules_in_2024/ things aren't quite there yet. I have to also take care that things can be run in CI, so GitHub Actions also needs the necessary infra to enable that. Best I can do once compilers are better with modules is put up an example repository with custom tooling on the wiki page.

friendlyanon avatar Feb 27 '24 16:02 friendlyanon

see too https://discourse.cmake.org/t/installed-module-library-cant-find-imported-headers-ubuntu-22-04-lts-cmake-3-28-1-ninja-1-11-1-and-clang-17-0-6/9819/23 and my example https://github.com/ClausKlein/cmake-module-error

ClausKlein avatar Feb 27 '24 18:02 ClausKlein

How can I help to go forward to implement this issue?

see too https://discourse.cmake.org/t/building-installing-and-consuming-shared-libraries-with-c-20-modules/10576

ClausKlein avatar Apr 06 '24 20:04 ClausKlein

I'll only add modules stuff to the templates once import std; works in GitHub Actions with the pre-installed toolchains. AFAIK, libstdc++ hasn't even been modularized yet.

friendlyanon avatar Apr 07 '24 11:04 friendlyanon

Looking forward to this

ConorWilliams avatar Apr 24 '24 10:04 ConorWilliams

I got the CXX_MODULE work for the fmt and partly for asio library:

https://github.com/ClausKlein/fmt-module

ClausKlein avatar Dec 04 '24 12:12 ClausKlein