Also call out to the guidelines for using pkg-config dependencies first,
and reference it for other build systems as well.
Although the possibility of installing with a pkg-config file is
somewhat hidden away in the meson docs, it's been deemed less invasive
due to not distracting away from cmake. So it will have to do.
This serves as a minimal release-only way to embed json into a project.
Add meson support to this directly, to make it usable standalone as a
meson subproject.
Implements #1672
In a future commit we want to add support for MSVC 2019. For that
version cmake requires us to pass in the architecture not part of the
generator but explicitly.
So let's pass that in always like that. This also removes the doubling
of the platform/architecture.
Using GLOB is slow and considered bad practice.
From https://cmake.org/cmake/help/latest/command/file.html:
> We do not recommend using GLOB to collect a list of source files from
> your source tree. If no CMakeLists.txt file changes when a source is
> added or removed then the generated build system cannot know when to ask
> CMake to regenerate. The CONFIGURE_DEPENDS flag may not work reliably on
> all generators, or if a new generator is added in the future that cannot
> support it, projects using it will be stuck. Even if CONFIGURE_DEPENDS
> works reliably, there is still a cost to perform the check on every
> rebuild.
binary_writer.hpp:869: (style) Consider using std::accumulate algorithm instead of a raw loop.
910a7d2b87/checks (step):5:107
Signed-off-by: Xav83 <x.jouvenot@gmail.com>
binary_reader.hpp:650: (style) Unsigned expression 'mant' can't be negative so it is unnecessary to test it
910a7d2b87/checks (step):5:84
Signed-off-by: Xav83 <x.jouvenot@gmail.com>
For some gcc version (Ubuntu 5.5.0-12ubuntu1~16.04) the existing code
crashes when the minimum value of int64_t is outputted.
Resurrect the code from before 546e2cbf (🚨 fixed some warnings,
2019-03-13) but delegate the sign removal so that the compilers don't
complain about taking the negative value of an unsigned value.
In addition we also rewrite the expression so that we first increment
and then negate.
The definition of remove_sign(number_unsigned_t) is never called as
unsigned values are never negative.
The clang sanitizer tests, and there especially the unicode tests, can
hit the default timeout of 25 minutes (1500 seconds) quite easily, so
let's raise the timeout to 45 minutes (2700 seconds).