Skip to content

CMake: export reflectcpp and pugixml include directories as SYSTEM #113

Done

Description

@clockblocker

Bug

reflectcpp's CMake target exports its public/interface include directories (include/ and bundled include/rfl/thirdparty) without SYSTEM, and links pugixml::pugixml without marking its interface include directories as SYSTEM. Consumers compiling with strict warning flags (-Werror, -Weverything, -Wconversion, -Wshadow, etc.) hit warnings inside reflect-cpp and pugixml headers and must manually copy INTERFACE_INCLUDE_DIRECTORIES into INTERFACE_SYSTEM_INCLUDE_DIRECTORIES on both reflectcpp and pugixml::pugixml.

Evidence

  • Surfaced in clockblocker/ccache#2 and clockblocker/cppcheck#3 Showcase Migrations (both had to patch INTERFACE_SYSTEM_INCLUDE_DIRECTORIES on reflectcpp and pugixml::pugixml in consumer CMake).
  • Affected sites in CMakeLists.txt (showcase/all-lanes):
    • CMakeLists.txt:259-267 (reflectcpp public include & bundled include/rfl/thirdparty)
    • CMakeLists.txt:292-294 (bundled include/rfl/thirdparty under JSON)
    • CMakeLists.txt:454-465 (pugixml::pugixml public link when REFLECTCPP_XML is enabled)

Acceptance Criteria

  • Export reflectcpp interface include directories (including bundled third-party headers) as SYSTEM for downstream consumers (preserving warnings when building reflect-cpp itself if appropriate via PRIVATE vs SYSTEM INTERFACE, or SYSTEM PUBLIC per CMake best practices).
  • Ensure transitive pugixml::pugixml include directories are treated as SYSTEM when consumed through reflectcpp (when REFLECTCPP_XML is enabled).
  • Verify that a consumer target compiled with -Wall -Wextra -Werror (and -Wconversion/-Wshadow) including <rfl/json.hpp> and <rfl/xml.hpp> compiles cleanly without manual INTERFACE_SYSTEM_INCLUDE_DIRECTORIES workarounds.

Activity

  1. added
    bug
    ready-for-agent
    on Nov 27, 2026
  2. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Additional evidence merged from duplicate issue #111 (osmium-tool & solidity Showcase Migrations): 406 -Wold-style-cast warnings from yyjson.h and -Wnewline-eof warnings from enchantum also leak when reflectcpp exports non-SYSTEM includes; verify downstream compiles cleanly with -Wold-style-cast -Wnewline-eof -Werror as well.

  3. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Resolved on showcase/all-lanes via Batch 1 merge 4861aafd (commits d4700190, d3673b24). Verified with 962/962 CTest passing under AppleClang 17 -Wall -Werror + REFLECTCPP_STRICT_WARNINGS=ON (non-SYSTEM -I for internal tests, -isystem for downstream consumers) and dual Judge approval (Gemini 4 Neon High: APPROVE WITH NITS, all addressed; Claude Opus 5.5 High re-check: APPROVE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions