-
Notifications
You must be signed in to change notification settings - Fork 14
/
binding.gyp
111 lines (111 loc) · 3.23 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"targets": [
{
"target_name": "fasttext",
"sources": [
"fastText/src/args.h",
"fastText/src/args.cc",
"fastText/src/dictionary.h",
"fastText/src/dictionary.cc",
"fastText/src/fasttext.h",
"fastText/src/fasttext.cc",
"fastText/src/matrix.h",
"fastText/src/matrix.cc",
"fastText/src/model.h",
"fastText/src/model.cc",
"fastText/src/productquantizer.h",
"fastText/src/productquantizer.cc",
"fastText/src/qmatrix.h",
"fastText/src/qmatrix.cc",
"fastText/src/real.h",
"fastText/src/utils.h",
"fastText/src/utils.cc",
"fastText/src/vector.h",
"fastText/src/vector.cc",
"src/node-util.cc",
"src/node-argument.cc",
"src/loadModel.cc",
"src/train.cc",
"src/quantize.cc",
"src/predictWorker.cc",
"src/nnWorker.cc",
"src/wrapper.cc",
"src/classifier.cc",
"src/query.cc",
"src/addon.cc"
],
"defines": [
"NAPI_VERSION=<(napi_build_version)",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"cflags": [
"-std=c++11",
"-pthread",
"-fexceptions",
"-O3",
"-Wall",
"-Wno-sign-compare",
"-pedantic",
"-DUSE_SSE",
"-DUSE_SSE2"
],
"conditions": [
[ "OS=='linux'", {
"cflags+": [ "-std=c++11", "-fexceptions" ],
"cflags_c+": [ "-std=c++11", "-fexceptions" ],
"cflags_cc+": [ "-std=c++11", "-fexceptions" ],
}],
[ "OS=='freebsd'", {
"cflags+": [ "-std=c++11", "-fexceptions" ],
"cflags_c+": [ "-std=c++11", "-fexceptions" ],
"cflags_cc+": [ "-std=c++11", "-fexceptions" ],
}],
[ "OS=='mac'", {
"cflags+": [ "-stdlib=libc++" ],
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS" : [ "-std=c++11", "-stdlib=libc++", "-pthread" ],
"OTHER_LDFLAGS": [ "-stdlib=libc++" ],
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET": "10.7",
"CLANG_CXX_LANGUAGE_STANDARD":"c++11",
"CLANG_CXX_LIBRARY": "libc++"
},
}],
[
"OS=='win'", {
"cflags": [
"-Wall"
],
"defines": [
"WIN"
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": "2",
"DisableSpecificWarnings": [
"4244"
],
},
"VCLinkerTool": {
"LinkTimeCodeGeneration": 1,
"OptimizeReferences": 2,
"EnableCOMDATFolding": 2,
"LinkIncremental": 1,
}
}
}]
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": ["<(module_name)"],
"copies": [{
"files": ["<(PRODUCT_DIR)/<(module_name).node"],
"destination": "<(module_path)"
}]
}
]
}