[Smtk-developers] JSON in SMTK
Ben Boeckel
ben.boeckel at kitware.com
Thu Sep 14 11:06:07 EDT 2017
On Thu, Sep 14, 2017 at 10:52:47 -0400, David Thompson wrote:
> I think since it is header-only that we would not need to mangle it,
> but rather install it inside the smtk include tree (e.g.,
> include/smtk/thirdparty/nlohmann_json) so that others can use exactly
This only works if when `FindNLohmann.cmake` (or whatever) is run, they
find *this* one. If they find another, they have to disagree on what
`json::value_t` is at the symbol level (because it's part of our symbol
mangling for functions in C++). I don't think this removes the need for
mangling actually, even though it is just header-only.
> the version SMTK is compiled with. We can define a macro (yes!) for
> nlohmann's include path so that it is possible to use an external
> version or third party version:
This better not make SMTK not relocatable when SDKs become required…
> #include "smtk/Options.h"
> #include SMTK_NLOHMANN_JSON_H
RIP clang-format ;) .
--Ben
More information about the Smtk-developers
mailing list