r/cpp • u/not_a_novel_account cmake dev • Jun 01 '26
BMI Compatibility: Testing Build System C++ Modules Support
https://blog.vito.nyc/posts/bmi-compatibility/
68
Upvotes
r/cpp • u/not_a_novel_account cmake dev • Jun 01 '26
View all comments
Show parent comment
1
u/not_a_novel_account cmake dev Jun 02 '26
The language has no notion of BMI compatibility, it's not something mandated as part of the standard.
It's also not compiling, despite the use of the word "build". Generating BMIs is much cheaper than producing an object file, it's effectively the same as parsing the header file.
Previously, parsing a header in the context of the consuming TU was something you got trivially from plaintext inclusion, now the build system has to make it happen. The benefit is we have to do it far less often than every single TU which happens to use the interface, like with headers, only when we have incompatible contexts.