Skip to content

[#114.1] Add iwyu enforcement to glfw_adapters and demo_app#121

Merged
thomasnemer merged 1 commit intomainfrom
117-add-iwyu-enforcement-to-glfw-adapters-and-demo-app
Nov 11, 2025
Merged

[#114.1] Add iwyu enforcement to glfw_adapters and demo_app#121
thomasnemer merged 1 commit intomainfrom
117-add-iwyu-enforcement-to-glfw-adapters-and-demo-app

Conversation

@thomasnemer
Copy link
Copy Markdown
Contributor

Summary

Implements issue #117, part of #114 (Make include-what-you-use mandatory for all example builds).

This PR adds CXX_INCLUDE_WHAT_YOU_USE enforcement to:

  • glfw_adapters library
  • prong_demo_app executable

Changes

CMakeLists.txt Updates

  • Added iwyu property to glfw_adapters library target
  • Added iwyu property to prong_demo_app executable target
  • Both targets now use --error flag to fail builds on include violations

Include Fixes

  • demo_app/main.cpp: Added missing #include <string>, removed unused #include <cmath>
  • viewport.h: Removed 4 unused private scrollbar state fields that triggered -Wunused-private-field warnings

Verification

All checks pass:

  • mise build - No iwyu errors
  • mise build-examples - Demo app builds successfully
  • mise test - All 17 tests pass
  • ✅ Pre-commit hooks (format-check) - Pass
  • ✅ Pre-push hooks (build-validation) - Pass

Impact

Related Issues

## Changes

- Add CXX_INCLUDE_WHAT_YOU_USE property to glfw_adapters library
- Add CXX_INCLUDE_WHAT_YOU_USE property to prong_demo_app executable
- Fix include violations in demo_app/main.cpp (add <string>, remove unused <cmath>)
- Remove unused private scrollbar fields from Viewport component

## Impact

- Enforces include-what-you-use for demo infrastructure
- Prevents future include violations with --error flag
- All builds and tests pass successfully

Part of #114 - Make include-what-you-use mandatory for all example builds
@thomasnemer thomasnemer merged commit 88ebdb4 into main Nov 11, 2025
1 check passed
@thomasnemer thomasnemer deleted the 117-add-iwyu-enforcement-to-glfw-adapters-and-demo-app branch November 11, 2025 17:28
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.1] Add iwyu enforcement to glfw_adapters and demo_app

1 participant