Using `set(... CACHE ...)` causes `XXHASH_BUILD_XXHSUM` to be stuck `ON` even
when doing a `set(XXHASH_BUILD_XXHSUM OFF)` for some cmake version/generators.
Switching to `option(...)` fixes this issue and allows you to properly turn off
the building of xxhsum in all situations.
It now exists in xsum_sanity_check.c
Also add `XSUM_NO_TESTS` option, which instead prints "This version of xxhsum
is not verified." to stderr whenever XSUM_sanityCheck() is called.
Most, if not all platform-specific code is in its own file now.
Also, minor, fix Windows ANSI API usage on XSUM_isDirectory()
Didn't test Windows yet, waiting for CI.
A new change is that XSUM_fprintf_utf8 (now XSUM_vfprintf) separates
the printing and the formatting routines, instead using a vasprintf
implementation. Functionally the same, but much cleaner now.
- Remove most remaining spaces before punctuation
- Fix a few missed copyright messages
- Document the timer resolution workaround
- Document XXH_mult32to64
- I compiled GCC 3.2 and 4.2 just to test this, both are affected.
- Make sure we downcast for __emulu
- Other minor fixes
instead of xxhash.c .
This seems preferable for some build systems,
which don't like the `#include "xxhash.c"` statement
when inlining xxhash, as reported by @pdillinger .
Note that `xxhash.c` still exists,
it just includes the implementation and instantiates it.
Instead of having your own option for choosing between static
and shared versions of the library, use cmake's built-in option
for this:
https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html
Set -DBUILD_SHARED_LIBS=ON to get a shared library, and omit it
or set it to OFF to get a static one.
Can add one extra line to the cmake file to make the default be
shared. Makes most of the cmake crap go away.