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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
VDT Finding Fix, master branch (2023.12.05.) #14178
Merged
bellenot
merged 2 commits into
root-project:master
from
krasznaa:FindVdtFix-master-20231205
Dec 6, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
on line 102, we could add sth along this line:
else() set (nlohmann_json... "${_thisdir}/.." CACHE PATH "Location of (the builtin) nlohmann-json")
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.
I do not think that we need special rule here for builtin
nlohmann/json.hpp
.Only when external
nlohmann_json
is used, it linked asPUBLIC
dependency and need to be there whencorrespondent library linked by user application. This is how it defined in REve:
So to say - builtin version should not be seen by user cmake.
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.
Hi @linev, but find_package (ROOT) fails (using ubu22 binary release) because it does not find where nlohmann json is, even if I do not need nlohman_json at all in my software.
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.
I just want to understand that kind of changes you want to have for
nlohmann_json
?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.
馃槙 Have a look at line 100-102. The logic is actually the opposite for nlohmann_json. CMake only calls
find_dependency(nlohmann_json...)
if it's not built-in. For a built-in nlohmann_json the CMake setup does nothing. As it expects that the normal ROOT include path would make thenlohmann/json.hpp
file visible as well. 馃But this also means that apparently the binary downloaded by @ferdymercury does not have nlohmann_json included in it. If it did, ROOT would not be looking for it.
Long story short, I didn't think that we needed to do anything with the JSON dependency. Also because that's not something that would've changed recently. I only modified how VDT is handled in 6.30. The JSON dependency did not change wrt. 6.28 as far as I can see. 馃
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.
For adding some info, here a 'diff' of old 6.28 and new 3.30 ROOT versions wrt nlohmann:
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.
Hmm... I myself would re-write the JSON dependency handling in the same way as VDT is handled now... But that we should do in a separate PR.
And yes, it very much seems that in the 6.30 binary
builtin_nlohmannjson
was turned off for some reason. 馃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.
Hmmm, I would like to use
find_package(ROOT)
with binary release 6.30.02 without forcing me to install nlohmann_json externally. (Or if I do need to install externally, then mention that in the prerequisites website).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.
Oh, I see. The same happened with builtin_afterimage. If this was done on purpose, then we should add nlohmann_json to the prerequisites, as I did with afterimage: https://github.com/root-project/web/pull/936/files