
On Sun, 22 Dec 2024, 17:10 Peter Dimov,
Ruben Perez wrote:
This is what I currently have. It's incomplete and will get some more work today:
https://github.com/anarthal/boost-cmake/tree/feature/cxx20-modules https://github.com/anarthal/config/tree/feature/cxx20-modules https://github.com/anarthal/assert/tree/feature/cxx20-modules https://github.com/anarthal/throw_exception/tree/feature/cxx20-modules https://github.com/anarthal/mp11/tree/feature/cxx20-modules https://github.com/anarthal/core/tree/feature/cxx20-modules
Regarding
boost_set_cxx20_module_settings(boost_assert)
You can't rely on this function being available in a library's CMakeLists.txt file. Libraries (except those by Andrey) can be used without the superproject.
My assumption here was "modules only work with the superproject, either via add_subdirectory or via install + find_package". I was likely too naive, and the restriction should probably be lifted. How about providing the function in a helper cmake script which must be included by code using modules? We can always copy-paste the settings, but it can be a little bit of a mess.