
On Thu, 19 Dec 2024, 15:43 Peter Dimov via Boost,
If I understood the CMake developers and Chuanqi correctly (please let me know if I didn't), you do install a library with the generated object files, but you do not install the BMIs, as they're like pre-compiled headers.
Let me explain how I understood it with two concrete examples. Take Boost.Url as an example of a compiled library, and Boost.Regex as an example of a header-only library.
1. Boost.Url today installs: * libboost_url.a, containing function definitions. * Headers, containing declarations. 2. Boost.Url in the module world would install: * libboost_url.a, containing the same function definitions as above. * A boost_url.cppm file, akin to what headers are today. CMake would build a BMI from this file when a user needs to import boost.url. In practice, this cppm file will likely be implemented in terms of
Ruben Perez wrote: the
header files that we have today.
Since this .cppm file will include the header files, the header files should also be installed in the module case.
Yes. And some libraries also need to export macros. These need to be provided by traditional headers. For example, Asio needs to provide BOOST_ASIO_HAS_LOCAL_SOCKETS.
Where does the .cppm file go by convention? In which directory?
I don't think there is a convention for it yet.