Fix issue with XXHASH_BUILD_XXHSUM cmake setting #468

Merged
devpow112 merged 1 commit from patch-1 into dev 2020-10-26 15:12:10 -05:00
devpow112 commented 2020-10-25 20:23:20 -05:00 (Migrated from github.com)

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.

Currently using set(XXHASH_BUILD_XXHSUM OFF CACHE BOOL "" FORCE) before including xxhash into another cmake project gets around the issue but is non-obvious.

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. Currently using `set(XXHASH_BUILD_XXHSUM OFF CACHE BOOL "" FORCE)` before including xxhash into another cmake project gets around the issue but is non-obvious.
Cyan4973 (Migrated from github.com) approved these changes 2020-10-25 21:07:14 -05:00
devpow112 commented 2020-10-25 21:07:53 -05:00 (Migrated from github.com)

Thanks @Cyan4973 for the quick review 👍

Thanks @Cyan4973 for the quick review 👍
Sign in to join this conversation.
No description provided.