Skip to content

Honor JSONCPP_WITH_INSTALL for package metadata - #1722

Open
fhgffy wants to merge 2 commits into
open-source-parsers:masterfrom
fhgffy:fix/cmake-disable-install-metadata
Open

fhgffy wants to merge 2 commits into
open-source-parsers:masterfrom
fhgffy:fix/cmake-disable-install-metadata

Conversation

@fhgffy

@fhgffy fhgffy commented Oct 5, 2026

Copy link
Copy Markdown

Summary

Honor JSONCPP_WITH_INSTALL=OFF in the root CMake-package and pkg-config blocks, matching the existing library/header installation guards. Update the option help to describe all JsonCpp files, and add a configure/build regression job without changing the existing CI matrix or check names.

The option was introduced in #1596 for submodule use. On current master, disabling it while leaving the default CMake-package option enabled fails generation:

CMake Error: INSTALL(EXPORT) given unknown export "jsoncpp"

If CMake packaging is also disabled, the current build can still install a .pc file for headers/libraries that were not installed. Both metadata formats describe an install tree, so they now follow the installation option as well. Their existing individual switches retain their behavior when installation is enabled.

Testing

  • Baseline failure reproduced with tests OFF and with the exact new CI options and tests left ON
  • Fixed 12-case CMake configure/build/install matrix, including all no-install metadata combinations and static/shared parent consumers
  • All 3 existing CTest tests on both baseline and fixed with C++11, C++17, and C++20 library configurations
  • Installed CMake-package and isolated pkg-config consumers compile, link, and run
  • CMake 3.14.4 and 3.31.6 baseline-red/fixed-green checks
  • Independent patch review and fresh-source replay
  • Patch whitespace check

Local testing used Linux/GCC 14.2.0. Windows/macOS and hosted CI have not been run for this patch.

@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Build configuration now respects install flag for package metadata.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

The PR gates CMake-package and pkg-config installation on JSONCPP_WITH_INSTALL and adds a CI staged-install check for the disabled case.

  • The latest change addresses the earlier request to check installed output.

Reviews (2) · Last reviewed commit: "Verify no-install builds leave an empty ..."

Comment thread .github/workflows/cmake.yml

This branch has not been deployed

No deployments
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.

1 participant