Skip to content

[#114.3] Add iwyu enforcement to intermediate examples#123

Merged
thomasnemer merged 1 commit intomainfrom
119-add-iwyu-enforcement-to-intermediate-examples
Nov 11, 2025
Merged

[#114.3] Add iwyu enforcement to intermediate examples#123
thomasnemer merged 1 commit intomainfrom
119-add-iwyu-enforcement-to-intermediate-examples

Conversation

@thomasnemer
Copy link
Copy Markdown
Contributor

Summary

Add CXX_INCLUDE_WHAT_YOU_USE property to all 4 intermediate examples (01_nested_panels, 02_responsive_ui, 03_event_handling, 04_dynamic_layout) and fix include issues identified by iwyu.

This is part of #114 - making include-what-you-use mandatory for all example builds.

Changes

CMakeLists.txt modifications

  • Add iwyu enforcement to all 4 intermediate example targets
  • Use configuration: "${IWYU_PATH};-Xiwyu;--error;-Xiwyu;--verbose=3"

Include fixes

  • 01_nested_panels/main.cpp: Added component_traits.h for Color type
  • 02_responsive_ui/main.cpp: Added theming/color.h for theming::Color
  • 03_event_handling/main.cpp: Added theming/color.h, removed unused Button include
  • 04_dynamic_layout/main.cpp: Added component_traits.h and <vector>, added forward declaration

Test Plan

  • mise build-examples succeeds without iwyu errors
  • All 55 targets build successfully
  • Git hooks (format-check, build-validation) pass
  • All intermediate examples now enforce include-what-you-use

Related

Add CXX_INCLUDE_WHAT_YOU_USE property to all 4 intermediate examples and fix the include issues identified by iwyu.

Changes:
- Add iwyu enforcement to CMakeLists.txt for all 4 intermediate examples
- Fix missing includes in example source files as reported by iwyu
- Ensure all intermediate examples build successfully with strict include checking

This ensures intermediate examples follow the same include hygiene standards as basic and advanced examples.

Closes #119
@thomasnemer thomasnemer merged commit 1f79e3c into main Nov 11, 2025
1 check passed
@thomasnemer thomasnemer deleted the 119-add-iwyu-enforcement-to-intermediate-examples branch November 11, 2025 17:47
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.

[#114.3] Add iwyu enforcement to intermediate examples

1 participant