瀏覽代碼

Add CityHash 1.1.0 wrap definition

1.1.0
Mahmoud Al-Qudsi 1 年之前
父節點
當前提交
2c73c911cf
共有 3 個文件被更改,包括 43 次插入0 次删除
  1. +24
    -0
      internal/meson.build
  2. +15
    -0
      meson.build
  3. +4
    -0
      upstream.wrap

+ 24
- 0
internal/meson.build 查看文件

@@ -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)

+ 15
- 0
meson.build 查看文件

@@ -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])

+ 4
- 0
upstream.wrap 查看文件

@@ -0,0 +1,4 @@
[wrap-git]
directory = cityhash-1.1.0
url = https://google.com/cityhash.git
revision = 8af9b8c

Loading…
取消
儲存