Skip to content

Update flag forking approach to use split config.hpp and config_generated.hpp files#128

Merged
ednolan merged 1 commit intomainfrom
enolan_flagfork1
May 1, 2026
Merged

Update flag forking approach to use split config.hpp and config_generated.hpp files#128
ednolan merged 1 commit intomainfrom
enolan_flagfork1

Conversation

@ednolan
Copy link
Copy Markdown
Member

@ednolan ednolan commented Apr 27, 2026

This commit reflects the new flag forking approach discussed in the
most recent Beman weekly sync:

  • For any configuration option where a compiler flag could cause
    differences in behavior that lead to ODR issues when linking two
    artifacts generated with different flags, maintainers generate a
    compiler definition like BEMAN_EXEMPLAR_FOOBAR into a
    config_generated.hpp header from a config_generated.hpp.in template.

  • Separately, a config.hpp file contains defaults for each
    definition. These defaults are only enabled if __has_include shows
    that the config_generated.hpp file is not present.

Comment thread include/beman/inplace_vector/CMakeLists.txt Outdated
Comment thread include/beman/inplace_vector/config.hpp Outdated
@ednolan ednolan force-pushed the enolan_flagfork1 branch from 9bc5fe8 to 7ccfa7c Compare May 1, 2026 23:28
…ated.hpp files

This commit reflects the new flag forking approach discussed in the
most recent Beman weekly sync:

- For any configuration option where a compiler flag could cause
  differences in behavior that lead to ODR issues when linking two
  artifacts generated with different flags, maintainers generate a
  compiler definition like BEMAN_EXEMPLAR_FOOBAR into a
  config_generated.hpp header from a config_generated.hpp.in template.
- Separately, a config.hpp file contains defaults for each
  definition. These defaults are only enabled if __has_include shows
  that the config_generated.hpp file is not present.
@ednolan ednolan changed the title Minor change to flag forking: config.hpp and config_generated.hpp Update flag forking approach to use split config.hpp and config_generated.hpp files May 1, 2026
@ednolan ednolan force-pushed the enolan_flagfork1 branch from 7ccfa7c to 5920d77 Compare May 1, 2026 23:30
@ednolan ednolan marked this pull request as ready for review May 1, 2026 23:31
@ednolan ednolan requested a review from wusatosi as a code owner May 1, 2026 23:31
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 98.649%. remained the same — enolan_flagfork1 into main

@ednolan ednolan merged commit a286126 into main May 1, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants