Sfoglia il codice sorgente

Add CityHash 1.1.0 wrap definition

1.1.0
Mahmoud Al-Qudsi 1 anno fa
parent
commit
2c73c911cf
3 ha cambiato i file con 43 aggiunte e 0 eliminazioni
  1. 24
    0
      internal/meson.build
  2. 15
    0
      meson.build
  3. 4
    0
      upstream.wrap

+ 24
- 0
internal/meson.build Vedi File

@@ -0,0 +1,24 @@
1
+conf = configuration_data()
2
+
3
+cc = meson.get_compiler('cpp')
4
+
5
+if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
6
+	conf.set('HAVE_BUILTIN_EXPECT', 1)
7
+endif
8
+
9
+foreach include : ['dlfcn', 'inttypes', 'memory', 'stdint', 'stdlib', 'strings', 'string', 'sys/stat', 'sys/types', 'unistd']
10
+	conf.set10('HAVE_' + include.underscorify().to_upper() + '_H', cc.has_header(include + '.h'))
11
+endforeach
12
+
13
+# use stdio.h as a proxy for all ANSI C header files
14
+conf.set('STDC_HEADERS', cc.has_header('stdio.h'))
15
+
16
+if build_machine.endian() == 'big'
17
+	conf.set('WORDS_BIGENDIAN', 1)
18
+endif
19
+
20
+if not cc.links('inline void foo() {} int main() { foo(); }', name: 'inline')
21
+	conf.set('inline', '')
22
+endif
23
+
24
+configure_file(output: 'config.h', configuration: conf)

+ 15
- 0
meson.build Vedi File

@@ -0,0 +1,15 @@
1
+project('cityhash', ['cpp'], license: 'MIT')
2
+
3
+subdir('internal')
4
+sources = ['src/city.cc']
5
+inc_dir = include_directories('src/')
6
+
7
+cityhash = library('cityhash', 'src/city.cc',
8
+	include_directories: [
9
+	  inc_dir,
10
+	  include_directories('internal')
11
+	])
12
+
13
+cityhash = declare_dependency(
14
+	link_with: [cityhash],
15
+	include_directories: [inc_dir])

+ 4
- 0
upstream.wrap Vedi File

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

Loading…
Annulla
Salva