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 07 '26 edited Jun 07 '26
You alter flags of the original library every time you include a header in a translation unit. How can you be certain changing from C to C++ will not change a declaration of a function from
zlib.h(via#ifdef __cplusplus)?You can't. Such is life.
And I didn't say anything about CPS. None of this has anything to do with how you package/find the artifacts. Module manifests are from P3286..
But every entry in the entire flagline is a liability, unless you're saying every TU, including objects contributing to all shared libraries, on the entire system should be compiled under completely identical flags. I can check for header availability in the preprocessor,
__has_include, so even-Iflags are a liability.