Closed yujincheng08 closed 1 month ago
Now that C++20 module support has been released in CMake I think it's reasonable to add it, at least as an option. Thanks for the suggestion.
@vitaut I have raised a PR for it. Lets see if it is a good start point.
Hi, fmtlib supports using
FMT_MODULE
to make itself a c++ module, but the implementation is building manually rather than using native support from CMake. This leads to some problems. For example, we cannot add definitions likeFMT_STATIC_THOUSANDS_SEPARATOR
.I saw previous discussion https://github.com/fmtlib/fmt/issues/3429#issuecomment-1544266960 concerning native support from CMake is not yet ready. But now it has been stabilize: https://www.kitware.com/import-cmake-the-experiment-is-over. Maybe it's time to add the support?
I tried something like
and it does work! (though we cannot add
FMT_STATIC_THOUSANDS_SEPARATOR
unless we comment outchrono.h
.)