-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
47 lines (36 loc) · 1.32 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
project('goldpolish', 'cpp',
version : '0.1.0',
license : 'GPL3',
default_options : [ 'cpp_std=c++17', 'warning_level=3', 'werror=true' ])
# Compiler and global flags
# ===========================================================
compiler = meson.get_compiler('cpp')
compiler_id = compiler.get_id()
compiler_version = compiler.version()
if compiler_id == 'gcc' and compiler_version.version_compare('<7.0.0')
error('GCC ' + compiler_version + ' is unsupported.')
endif
if compiler_id == 'clang' and compiler_version.version_compare('<10.0.0')
error('Clang ' + compiler_version + ' is unsupported.')
endif
if not meson.is_subproject()
global_args = []
global_link_args = [ '-ldl' ]
if compiler_id == 'clang'
global_link_args += [ '-lstdc++', '-lm' ]
endif
add_global_arguments(global_args, language : 'cpp')
add_global_link_arguments(global_link_args, language : 'cpp')
endif
# Build dependencies and subprojects
# ===========================================================
threads_dep = dependency('threads')
openmp_dep = dependency('openmp')
btllib_dep = compiler.find_library('btllib')
deps = [ threads_dep, openmp_dep, btllib_dep ]
# Source files, scripts
# ===========================================================
subdir('src')
subdir('scripts')
subproject('ntedit')
subproject('sealer')