-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbinding.gyp
83 lines (83 loc) · 2.34 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
81
82
83
{
'target_defaults': {
'include_dirs': ['src'],
'cflags_cc': [
'-fexceptions',
'-Wall',
'-Wno-cast-function-type',
'-Wno-deprecated-declarations',
'-O3'
],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS': [
'-fexceptions',
'-Wall',
'-Wno-macro-redefined',
'-Wno-deprecated-declarations',
'-O3'
]
},
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': ['4005', '4477', '4752']
}
}
},
'targets': [
{
'target_name': 'arch_specific',
'type': 'static_library',
'sources': ['src/highwayhash/arch_specific.cc'],
}, {
'target_name': 'hh_avx2',
'dependencies': ['arch_specific'],
'type': 'static_library',
'sources': ['src/highwayhash/highwayhash_target.cc'],
'defines': ['HH_TARGET_NAME=AVX2'],
'cflags_cc': ['-mavx2'],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-mavx2']
}
}, {
'target_name': 'hh_sse41',
'dependencies': ['arch_specific'],
'type': 'static_library',
'sources': ['src/highwayhash/highwayhash_target.cc'],
'defines': ['HH_TARGET_NAME=SSE41'],
'cflags_cc': ['-msse4.1'],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-msse4.1']
}
}, {
'target_name': 'hh_portable',
'dependencies': ['arch_specific'],
'type': 'static_library',
'sources': ['src/highwayhash/highwayhash_target.cc'],
'defines': ['HH_TARGET_NAME=Portable']
}, {
'target_name': 'instruction_sets',
'dependencies': ['hh_avx2', 'hh_sse41', 'hh_portable'],
'type': 'static_library',
'sources': ['src/highwayhash/instruction_sets.cc']
}, {
'target_name': 'highwayhash',
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1
}
},
'dependencies': [
'instruction_sets',
"<!(node -p \"require('node-addon-api').gyp\")"
],
'sources': ['src/bindings.cc'],
'include_dirs': ["<!@(node -p \"require('node-addon-api').include\")"],
}
]
}