Fix issue with XXHASH_BUILD_XXHSUM cmake setting

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.
This commit is contained in:
Devon Powell 2020-10-25 21:23:04 -04:00 committed by GitHub
parent 8296f4c32a
commit dabb850dfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
endif()
option(BUILD_SHARED_LIBS "Build shared library" ON)
set(XXHASH_BUILD_XXHSUM ON CACHE BOOL "Build the xxhsum binary")
option(XXHASH_BUILD_XXHSUM "Build the xxhsum binary" ON)
# If XXHASH is being bundled in another project, we don't want to
# install anything. However, we want to let people override this, so