pull in latest osmcode/libosmium changes
This commit is contained in:
+7
-3
@@ -226,7 +226,6 @@ if(Osmium_USE_SPARSEHASH)
|
||||
if(SPARSEHASH_INCLUDE_DIR)
|
||||
# Find size of sparsetable::size_type. This does not work on older
|
||||
# CMake versions because they can do this check only in C, not in C++.
|
||||
# Until we find a better way, we'll live with that.
|
||||
include(CheckTypeSize)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${SPARSEHASH_INCLUDE_DIR})
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "google/sparsetable")
|
||||
@@ -234,14 +233,19 @@ if(Osmium_USE_SPARSEHASH)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
set(CMAKE_REQUIRED_INCLUDES)
|
||||
|
||||
# Falling back to checking size_t if google::sparsetable<int>::size_type
|
||||
# could not be checked.
|
||||
if(SPARSETABLE_SIZE_TYPE STREQUAL "")
|
||||
check_type_size("void*" VOID_PTR_SIZE)
|
||||
set(SPARSETABLE_SIZE_TYPE ${VOID_PTR_SIZE})
|
||||
endif()
|
||||
|
||||
# Sparsetable::size_type must be at least 8 bytes (64bit), otherwise
|
||||
# OSM object IDs will not fit.
|
||||
if(SPARSETABLE_SIZE_TYPE GREATER 7)
|
||||
set(SPARSEHASH_FOUND 1)
|
||||
add_definitions(-DOSMIUM_WITH_SPARSEHASH=${SPARSEHASH_FOUND})
|
||||
list(APPEND OSMIUM_INCLUDE_DIRS ${SPARSEHASH_INCLUDE_DIR})
|
||||
elseif(SPARSETABLE_SIZE_TYPE STREQUAL "")
|
||||
message(WARNING "Osmium: Disabled Google SparseHash library because we can't detect whether we are on a 64bit system.")
|
||||
else()
|
||||
message(WARNING "Osmium: Disabled Google SparseHash library on 32bit system (size_type=${SPARSETABLE_SIZE_TYPE}).")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user