Skip to content

Commit 4c62886

Browse files
committed
Remove vestiges of SparseHash support
1 parent 65ca936 commit 4c62886

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

cmake/FindOsmium.cmake

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
# io - include libraries needed for any type of input/output
3333
# geos - include if you want to use any of the GEOS functions
3434
# gdal - include if you want to use any of the OGR functions
35-
# sparsehash - include if you use the sparsehash index (deprecated!)
3635
# lz4 - include support for LZ4 compression of PBF files
3736
#
3837
# You can check for success with something like this:
@@ -204,41 +203,6 @@ if(Osmium_USE_GDAL)
204203
endif()
205204
endif()
206205

207-
#----------------------------------------------------------------------
208-
# Component 'sparsehash'
209-
if(Osmium_USE_SPARSEHASH)
210-
message(WARNING "Osmium: Use of Google SparseHash is deprecated. Please switch to a different index type.")
211-
find_path(SPARSEHASH_INCLUDE_DIR google/sparsetable)
212-
213-
list(APPEND OSMIUM_EXTRA_FIND_VARS SPARSEHASH_INCLUDE_DIR)
214-
if(SPARSEHASH_INCLUDE_DIR)
215-
# Find size of sparsetable::size_type. This does not work on older
216-
# CMake versions because they can do this check only in C, not in C++.
217-
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
218-
include(CheckTypeSize)
219-
set(CMAKE_REQUIRED_INCLUDES ${SPARSEHASH_INCLUDE_DIR})
220-
set(CMAKE_EXTRA_INCLUDE_FILES "google/sparsetable")
221-
check_type_size("google::sparsetable<int>::size_type" SPARSETABLE_SIZE_TYPE LANGUAGE CXX)
222-
set(CMAKE_EXTRA_INCLUDE_FILES)
223-
set(CMAKE_REQUIRED_INCLUDES)
224-
else()
225-
set(SPARSETABLE_SIZE_TYPE ${CMAKE_SIZEOF_VOID_P})
226-
endif()
227-
228-
# Sparsetable::size_type must be at least 8 bytes (64bit), otherwise
229-
# OSM object IDs will not fit.
230-
if(SPARSETABLE_SIZE_TYPE GREATER 7)
231-
set(SPARSEHASH_FOUND 1)
232-
add_definitions(-DOSMIUM_WITH_SPARSEHASH=${SPARSEHASH_FOUND})
233-
list(APPEND OSMIUM_INCLUDE_DIRS ${SPARSEHASH_INCLUDE_DIR})
234-
else()
235-
message(WARNING "Osmium: Disabled Google SparseHash library on 32bit system (size_type=${SPARSETABLE_SIZE_TYPE}).")
236-
endif()
237-
else()
238-
message(WARNING "Osmium: Google SparseHash library is required but not found, please install it or configure the paths.")
239-
endif()
240-
endif()
241-
242206
#----------------------------------------------------------------------
243207

244208
list(REMOVE_DUPLICATES OSMIUM_INCLUDE_DIRS)

0 commit comments

Comments
 (0)