-
Notifications
You must be signed in to change notification settings - Fork 52
CMake: Install toml11 and nlohmann_json for inclusion in downstream code #1757
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
base: dev
Are you sure you want to change the base?
CMake: Install toml11 and nlohmann_json for inclusion in downstream code #1757
Conversation
0a0ef54
to
c3d0e0d
Compare
@franzpoeschel Please take care that dependency fetching from the web is on some systems not possible due to restrictions that login nodes or compute nodes are not allowed to download things from the web. |
Dependency fetching is already part of our build system, this PR does not change that, but rather adds an install step. Offline builds are fully supported (and we use them for distribution via package managers), see CMake variables:
|
This is an attempt at finding a solution for this issue ComputationalRadiationPhysics/picongpu#5355
Problem: If a downstream code wants to use nlohmann_json / toml11 as well, then it must use the same version used also in openPMD, otherwise it might happen that the same symbol defined by toml11/nlohmann_json might exist in different implementations (different versions) in libopenPMD.so and the compiled binary of the downstream. The linker might then jump between implementations, causing undefined behavior.
Attempted solution in this PR:
Alternatives:
TODO:
inline namespace