Skip to content

[CMake] Use find or fetch mechanism for nlohmann json - #5775

Merged
fredroy merged 2 commits into
sofa-framework:masterfrom
olivier-roussel:externalize_nlohmann_json
Nov 25, 2025
Merged

[CMake] Use find or fetch mechanism for nlohmann json#5775
fredroy merged 2 commits into
sofa-framework:masterfrom
olivier-roussel:externalize_nlohmann_json

Conversation

@olivier-roussel

Copy link
Copy Markdown
Contributor

Following the effort to make SOFA compatible with conda-forge rules, this replaces the use of embedded code for nlohmann json header-only library by a "find or fetch" mechanism as used for other dependencies. This has been outlined in a recent review of conda-forge SOFA PR (conda-forge/staged-recipes#23085).
Note that nlohmann json lib is used in both Sofa.Core and Sofa.Helper modules.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@olivier-roussel olivier-roussel changed the title Use find or fetch mechanism for nlohmann json [CMake] Use find or fetch mechanism for nlohmann json Nov 12, 2025
@olivier-roussel olivier-roussel added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Nov 12, 2025
@olivier-roussel
olivier-roussel force-pushed the externalize_nlohmann_json branch from d75e560 to 1d1a105 Compare November 12, 2025 13:56
@olivier-roussel

Copy link
Copy Markdown
Contributor Author

@bakpaul @hugtalbot I confirm that this works with nlohmann_json v3.9.1 (at least locally), so the current comments are good to me.
This is ready to merge !

@olivier-roussel olivier-roussel added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Nov 21, 2025
@fredroy

fredroy commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

[ci-build][with-all-tests]

@fredroy
fredroy merged commit 233b630 into sofa-framework:master Nov 25, 2025
11 checks passed
@hugtalbot hugtalbot added this to the v25.12 milestone Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants