[#114.2] Add iwyu enforcement to basic examples#122
Merged
thomasnemer merged 1 commit intomainfrom Nov 11, 2025
Merged
Conversation
Add CXX_INCLUDE_WHAT_YOU_USE property to all 8 basic example executables to enforce include-what-you-use checks at build time. This ensures example code maintains proper include hygiene and demonstrates best practices. Changes: - Add iwyu property to CMakeLists.txt for all 8 basic examples - Add missing includes to example source files to satisfy iwyu: - <functional>, <memory>, <utility> for standard library types - <string>, <vector>, <optional> where used - bombfork/prong/core/component.h for Component methods - GLFW adapter headers for text_input example All examples build successfully with iwyu --error flag enabled. Closes #118
This was referenced Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CXX_INCLUDE_WHAT_YOU_USEproperty to all 8 basic example CMakeLists.txt files--errorflag enabledChanges
CMakeLists.txt (8 files)
Added iwyu enforcement to:
Source Files (8 files)
Added missing includes to satisfy iwyu:
<functional>,<memory>,<utility>,<string>,<vector>,<optional><bombfork/prong/core/component.h>Test Plan
mise build-examples--errorflag (build would fail otherwise)Related Issues
Part of #114 - Make include-what-you-use mandatory for all example builds
Closes #118