-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinding.gyp
134 lines (134 loc) · 3.39 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
'variables': {
'enable_asan%': 'false',
'enable_coverage%': 'false',
'disable_int%': 'false'
},
'target_defaults': {
'cflags!': [ '-fno-exceptions', '-fno-rtti', '-fvisibility=default' ],
'cflags_cc!': [ '-fno-exceptions', '-fno-rtti', '-fvisibility=default' ],
'cflags_cc': [ '-fvisibility=hidden', '-std=c++17' ],
'ldflags': [ '-Wl,-z,now' ],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'OTHER_CPLUSPLUSFLAGS': [
'-frtti',
'-fexceptions',
'-std=c++17'
]
},
'conditions': [
['disable_int == "true"', {
'defines': [ 'EXPRTK_DISABLE_INT_TYPES' ]
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/MP',
'/GR',
'/EHsc',
'/bigobj',
'/wd4146',
'/wd4723',
'/std:c++17'
],
'ExceptionHandling': 1,
'RuntimeTypeInfo': 'true'
}
},
'configurations': {
'Debug': {
'cflags_cc!': [ '-O3', '-Os' ],
'defines': [
'DEBUG',
'exprtk_disable_enhanced_features'
],
'defines!': [ 'NDEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
}
},
'Release': {
'defines': [ 'NDEBUG' ],
'defines!': [ 'DEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': 's',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
},
'ldflags': [
'-Wl,-s'
],
'msvs_settings': {
'VCCLCompilerTool': {
'DebugInformationFormat': '0',
},
'VCLinkerTool': {
'GenerateDebugInformation': 'false',
}
}
}
}
},
'targets': [
{
'target_name': 'exprtk.js',
'sources': [
'src/expression.cc',
'src/async.cc',
'src/ndarray.cc'
],
'include_dirs': [
'deps/exprtk',
'include',
'<!@(node -p "require(\'node-addon-api\').include")'
],
'defines': [
'NAPI_VERSION=4',
'exprtk_disable_string_capabilities',
'exprtk_disable_rtl_io_file'
],
'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'],
'conditions': [
['enable_asan == "true"', {
'cflags_cc': [ '-fsanitize=address' ],
'ldflags' : [ '-fsanitize=address' ]
}],
["enable_coverage == 'true'", {
'cflags_cc': [ '-fprofile-arcs', '-ftest-coverage' ],
'ldflags' : [ '-lgcov', '--coverage' ]
}]
]
},
{
'target_name': 'exprtk.js-test',
'sources': [
'test/addon.test.cc'
],
'include_dirs': [
'include',
'<!@(node -p "require(\'node-addon-api\').include")'
],
'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'],
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [
'<(PRODUCT_DIR)/exprtk.js.node',
'<(PRODUCT_DIR)/exprtk.js-test.node'
],
'destination': '<(module_path)'
}
]
}
]
}