-
Notifications
You must be signed in to change notification settings - Fork 4
/
binding.gyp
98 lines (98 loc) · 3.8 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
{
"targets": [
{
"target_name": "fasttext",
"sources": [
"lib/src/args.cc",
"lib/src/args.h",
"lib/src/dictionary.cc",
"lib/src/dictionary.h",
"lib/src/fasttext.cc",
"lib/src/fasttext.h",
"lib/src/matrix.cc",
"lib/src/matrix.h",
"lib/src/model.cc",
"lib/src/model.h",
"lib/src/productquantizer.cc",
"lib/src/productquantizer.h",
"lib/src/qmatrix.cc",
"lib/src/qmatrix.h",
"lib/src/real.h",
"lib/src/utils.cc",
"lib/src/utils.h",
"lib/src/vector.cc",
"lib/src/vector.h",
"src/nodeArgument.cc",
"src/nodeArgument.h",
"src/classifier.h",
"src/classifierWorker.cc",
"src/query.h",
"src/trainWorker.cc",
"src/trainWorker.h",
"src/vectorWorker.cc",
"src/vectorWorker.h",
"src/nnWorker.cc",
"src/nnWorker.h",
"src/wrapper.cc",
"src/wrapper.h",
"src/fasttext.cc"
],
"include_dirs": ["<!(node -e \"require('nan')\")"],
"cflags": [
"-std=c++14",
"-pthread",
"-fexceptions",
"-O3",
"-Wsign-compare",
"-Wall",
"-march=native",
"-frtti"
],
"conditions": [
[ "OS=='linux'", {
"cflags+": [ "-std=c++14", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti" ],
"cflags_c+": [ "-std=c++14", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti"],
"cflags_cc+": [ "-std=c++14", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti" ],
}],
[ "OS=='freebsd'", {
"cflags+": [ "-std=c++17", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti" ],
"cflags_c+": [ "-std=c++17", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti" ],
"cflags_cc+": [ "-std=c++17", "-fexceptions", "-Wall", "-Wsign-compare", "-frtti" ],
}],
[ 'OS=="mac"', {
"cflags+": [ "-stdlib=libc++", "-Wsign-compare", "-frtti" ],
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS" : [ "-std=c++14", "-stdlib=libc++", "-pthread", "-Wsign-compare", "-frtti" ],
"OTHER_LDFLAGS": [ "-stdlib=libc++", "-frtti" ],
"MACOSX_DEPLOYMENT_TARGET": "10.11",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"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,
}
}
}]
]
}
]
}