| 1 |
cmph_sources = [ |
| 2 |
'bdz.c', |
| 3 |
'bdz_ph.c', |
| 4 |
'bmz8.c', |
| 5 |
'bmz.c', |
| 6 |
'brz.c', |
| 7 |
'buffer_entry.c', |
| 8 |
'buffer_manager.c', |
| 9 |
'chd.c', |
| 10 |
'chd_ph.c', |
| 11 |
'chm.c', |
| 12 |
'cmph.c', |
| 13 |
'cmph_structs.c', |
| 14 |
'compressed_rank.c', |
| 15 |
'compressed_seq.c', |
| 16 |
'fch_buckets.c', |
| 17 |
'fch.c', |
| 18 |
'graph.c', |
| 19 |
'hash.c', |
| 20 |
'jenkins_hash.c', |
| 21 |
'miller_rabin.c', |
| 22 |
'select.c', |
| 23 |
'vqueue.c', |
| 24 |
'vstack.c', |
| 25 |
] |
| 26 |
|
| 27 |
cmph_deps = [ |
| 28 |
glib_dep, |
| 29 |
gobject_dep, |
| 30 |
cc.find_library('m', required: false), |
| 31 |
] |
| 32 |
|
| 33 |
custom_c_args = [] |
| 34 |
|
| 35 |
if cc.get_id() != 'msvc' |
| 36 |
custom_c_args = cc.get_supported_arguments([ |
| 37 |
'-Wno-implicit-fallthrough', |
| 38 |
'-Wno-old-style-definition', |
| 39 |
'-Wno-suggest-attribute=noreturn', |
| 40 |
'-Wno-type-limits', |
| 41 |
'-Wno-undef', |
| 42 |
'-Wno-unused-parameter', |
| 43 |
'-Wno-cast-align', |
| 44 |
'-Wno-unused-function', |
| 45 |
'-Wno-return-type', |
| 46 |
'-Wno-sometimes-uninitialized', |
| 47 |
]) |
| 48 |
endif |
| 49 |
|
| 50 |
cmph = static_library('cmph', |
| 51 |
sources: cmph_sources, |
| 52 |
c_args: gi_hidden_visibility_cflags + custom_c_args, |
| 53 |
dependencies: cmph_deps, |
| 54 |
) |
| 55 |
|
| 56 |
cmph_dep = declare_dependency( |
| 57 |
link_with: cmph, |
| 58 |
include_directories: include_directories('.'), |
| 59 |
) |
| 60 |
|
| 61 |
if cc.get_id() != 'msvc' |
| 62 |
custom_c_args = cc.get_supported_arguments([ |
| 63 |
'-Wno-old-style-definition', |
| 64 |
'-Wno-type-limits', |
| 65 |
]) |
| 66 |
endif |
| 67 |
|
| 68 |
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c', |
| 69 |
dependencies: [ |
| 70 |
cmph_dep, |
| 71 |
glib_dep, |
| 72 |
gobject_dep, |
| 73 |
], |
| 74 |
c_args: custom_c_args, |
| 75 |
) |
| 76 |
|
| 77 |
test('cmph-bdz-test', cmph_test) |