nlohmann_json: allow system package
Created by: ax3l
Add the CMake ADIOS2_USE_SYSTEM_JSON[=OFF]
option. With this option, package system maintainers can decide to use an external nlohmann-json library, e.g. to provide bug fixes.
Defaults as before to the internally shipped json library.
Refactoring
-
CMake: the self-defined name
NLohmannJSON
differed from the official CMake target name. I updated the old CMake targets to stay consistent with the "upstream" name which avoids introducing aliases when using the library from an external location. -
Include: the official API is included via
<nlohmann/json.hpp>
. Keep the prefix to stay consistent between internally shipped and externally installed headers.
To Do
-
see inline question about robot min-version update -
generally, ADIOS2_USE_SYSTEM_...=ON
was broken since found packages were not visible in the parent scope (rootCMakeLists.txt
) -> Issue identified, fix added to last commit: SO link