This repository has been archived by the owner on Oct 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
binding.gyp
80 lines (80 loc) · 2.57 KB
/
binding.gyp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
'includes': [ 'common.gypi' ],
"variables": {
# Flags we pass to the compiler to ensure the compiler
# warns us about potentially buggy or dangerous code
"compiler_checks": [
'-Wall',
'-Wextra',
'-Weffc++',
'-Wconversion',
'-pedantic',
'-Wconversion',
'-Wshadow',
'-Wfloat-equal',
'-Wuninitialized',
'-Wunreachable-code',
'-Wold-style-cast',
'-Wno-error=unused-variable',
'-Wno-error=unused-value'
],
},
'targets': [
{
'target_name': 'action_before_build',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'install_deps',
'inputs': ['./scripts/install_deps.sh'],
'outputs': ['./mason_packages'],
'action': ['./scripts/install_deps.sh']
}
]
},
{
'target_name': '<(module_name)',
'dependencies': [ 'action_before_build' ],
'product_dir': '<(module_path)',
'sources': [
"./src/cpp_util.cpp",
"./src/node_util.cpp",
"./src/memorycache.cpp",
"./src/rocksdbcache.cpp",
"./src/coalesce.cpp",
"./src/binding.cpp"
],
"include_dirs" : [
'src/',
'<!(node -e \'require("nan")\')',
'./mason_packages/.link/include/'
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/librocksdb.a',
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a'
],
'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
'cflags_cc' : [
'<@(compiler_checks)'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS':[
'<@(compiler_checks)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
}
]
}