Add CityHash 1.1.0 wrap definition
parent
fa9bba7079
commit
2c73c911cf
@ -0,0 +1,24 @@
|
|||||||
|
conf = configuration_data()
|
||||||
|
|
||||||
|
cc = meson.get_compiler('cpp')
|
||||||
|
|
||||||
|
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
|
||||||
|
conf.set('HAVE_BUILTIN_EXPECT', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
foreach include : ['dlfcn', 'inttypes', 'memory', 'stdint', 'stdlib', 'strings', 'string', 'sys/stat', 'sys/types', 'unistd']
|
||||||
|
conf.set10('HAVE_' + include.underscorify().to_upper() + '_H', cc.has_header(include + '.h'))
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
# use stdio.h as a proxy for all ANSI C header files
|
||||||
|
conf.set('STDC_HEADERS', cc.has_header('stdio.h'))
|
||||||
|
|
||||||
|
if build_machine.endian() == 'big'
|
||||||
|
conf.set('WORDS_BIGENDIAN', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not cc.links('inline void foo() {} int main() { foo(); }', name: 'inline')
|
||||||
|
conf.set('inline', '')
|
||||||
|
endif
|
||||||
|
|
||||||
|
configure_file(output: 'config.h', configuration: conf)
|
@ -0,0 +1,15 @@
|
|||||||
|
project('cityhash', ['cpp'], license: 'MIT')
|
||||||
|
|
||||||
|
subdir('internal')
|
||||||
|
sources = ['src/city.cc']
|
||||||
|
inc_dir = include_directories('src/')
|
||||||
|
|
||||||
|
cityhash = library('cityhash', 'src/city.cc',
|
||||||
|
include_directories: [
|
||||||
|
inc_dir,
|
||||||
|
include_directories('internal')
|
||||||
|
])
|
||||||
|
|
||||||
|
cityhash = declare_dependency(
|
||||||
|
link_with: [cityhash],
|
||||||
|
include_directories: [inc_dir])
|
@ -0,0 +1,4 @@
|
|||||||
|
[wrap-git]
|
||||||
|
directory = cityhash-1.1.0
|
||||||
|
url = https://google.com/cityhash.git
|
||||||
|
revision = 8af9b8c
|
Loading…
Reference in New Issue