-
-
Notifications
You must be signed in to change notification settings - Fork 261
Find nlohmann_json test dependency only when required #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find nlohmann_json test dependency only when required #342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If @justend29 wants to extend it with cmake_dependent_option
I am open to it, otherwise its good to merge as is.
Yes - I believe falling back to downloading and building the package when it's not found is not a convenience, it's a mistake. It's far too easy to mistype paths and then get the surprise of downloading a package you already have. Explicit selection of which to use is worthwhile. A dependent option, maybe Adding now. Let me know if you'd like further changes. Also, really great library. Thank you for the contributions. |
I think in the longer term we'll probably switch to this since it;s maintained unlike the current default
LGTM, thanks for the contribution. I think there are missing tests for and/or feature for pickup the different JSON libraries from out find config but thats also not how it's supported? it just adds all of them and lets the user figure the rest out 🤷 |
nlohmann::json is used in the examples and tests of jwt-cpp. However, it was always found, making it a transitive dependency for all users of jwt-cpp - even those not building examples or tests. These changes simply check if nlohman_json is required as a host dependency before searching for it.