-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Build failure with nlohmann/json 3.11 #11312
Comments
I think this might have been fixed by #11111 |
Yes, it is albeit as similar patch still needs to be applied to the genreflex code path in ROOT's cmake. |
On the surface the issue is that cmake produce rootcling command line for G__RIO.cxx which contains:
Note the -D followed by nothing. We noted this problem with a Spack build which is building ROOT with no builtin. The one option on the cmake command line that triggered the problem is:
Inside nlohmann the line of nlohmann_jsonTargets.cmake that caused the problem is:
This information is used in ROOT in ROOT_GENERATE_DICTIONARY:
Experimentally having INTERFACE_COMPILE_DEFINITIONS contains a single value:
or a value plus one or more 'empty' generator expressions:
or a single 'empy' generator expressions:
However if INTERFACE_COMPILE_DEFINITIONS contains 2 or more 'empty' generator
It also appears to works if you don't quote the expressions:
However since those lines of cmake are generated by CMake as part of the install, It is fixed on the ROOT side with:
but it should be applied also to REFLEX_GENERATE_DICTIONARY:
|
Additional notes: nlohmann_json v3.9 only had one COMPILE_DEFINITIONS so it was working So ROOT without Jonas patch should be working with v3.10.5 and older but not with |
This applies the change made to ROOT_GENERATE_DICTIONARY in the main branch commit 08ab7e0 to GENREFLEX_GENERATE_DICTIONARY. This commit in conjunction with 08ab7e0 fixes root-project#11312. See commit 08ab7e0 and issue root-project#11312 for more details on the issue and solution.
This applies the change made to ROOT_GENERATE_DICTIONARY in the main branch commit 08ab7e0 to GENREFLEX_GENERATE_DICTIONARY. This commit in conjunction with 08ab7e0 fixes root-project#11312. See commit 08ab7e0 and issue root-project#11312 for more details on the issue and solution.
This applies the change made to ROOT_GENERATE_DICTIONARY in the main branch commit 08ab7e0 to GENREFLEX_GENERATE_DICTIONARY. This commit in conjunction with 08ab7e0 fixes root-project#11312. See commit 08ab7e0 and issue root-project#11312 for more details on the issue and solution.
Describe the bug
(@pcanal determined that it's JSON at fault here)
Building with external nljson 3.11 causes CMake to emit an empty
-D
definition on the command line, breaking a root-cling call inside the build:Expected behavior
The
-D
shouldn't be emitted, so the build will work.To Reproduce
I'm building with Spack:
Spack concretization
which results in the cmake command:
cmake
Setup
Additional context
The text was updated successfully, but these errors were encountered: