2020-08-15 16:13:23 +00:00
|
|
|
option (USE_INTERNAL_SPARSEHASH_LIBRARY "Set to FALSE to use system sparsehash library instead of bundled"
|
|
|
|
ON) # ON by default as we are not aware of any system providing package for sparsehash-c11
|
2017-02-28 23:49:04 +00:00
|
|
|
|
2019-09-17 21:08:20 +00:00
|
|
|
if (NOT USE_INTERNAL_SPARSEHASH_LIBRARY)
|
|
|
|
find_path (SPARSEHASH_INCLUDE_DIR NAMES sparsehash/sparse_hash_map PATHS ${SPARSEHASH_INCLUDE_PATHS})
|
2020-08-14 15:44:04 +00:00
|
|
|
if (NOT SPARSEHASH_INCLUDE_DIR)
|
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system sparsehash library")
|
|
|
|
endif ()
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
2019-09-17 21:08:20 +00:00
|
|
|
if (SPARSEHASH_INCLUDE_DIR)
|
2017-02-28 23:49:04 +00:00
|
|
|
else ()
|
2019-09-17 21:08:20 +00:00
|
|
|
set (USE_INTERNAL_SPARSEHASH_LIBRARY 1)
|
|
|
|
set (SPARSEHASH_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/sparsehash-c11")
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
2019-09-17 21:08:20 +00:00
|
|
|
message (STATUS "Using sparsehash: ${SPARSEHASH_INCLUDE_DIR}")
|