forked from JCMais/node-libcurl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.gyp
More file actions
88 lines (88 loc) · 3.33 KB
/
binding.gyp
File metadata and controls
88 lines (88 loc) · 3.33 KB
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
{
'targets': [
{
'target_name': '<(module_name)',
'sources': [
'src/node_libcurl.cc',
'src/Easy.cc',
'src/Share.cc',
'src/Multi.cc',
'src/Curl.cc',
'src/CurlHttpPost.cc',
'src/string_format.cc',
'src/strndup.cc'
],
'include_dirs' : [
"<!(node -e \"require('nan')\")"
],
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': ['4506', '4838'] #warning about v8 inline function and narrowing
}
},
'configurations' : {
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': '1',
'Optimization': 2, # /O2 safe optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
'OmitFramePointers': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'WarnAsError': 'true'
}
}
},
'Debug': {
'msvs_settings': {
'VCCLCompilerTool': {
'WarnAsError': 'false'
}
}
}
},
'cflags' : ['-std=c++11', '-O2', '-Wno-narrowing'],
'cflags!': [ '-fno-exceptions', '-O3' ], # enable exceptions, remove level 3 optimization
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS' : ['-std=c++11','-stdlib=libc++'],
'OTHER_LDFLAGS': ['-stdlib=libc++'],
'MACOSX_DEPLOYMENT_TARGET': '10.8',
'WARNING_CFLAGS':[
'-Wno-c++11-narrowing',
'-Wno-constant-conversion'
]
},
'conditions': [
['OS=="win"', {
'dependencies': [
'<!@(node "<(module_root_dir)/tools/retrieve-win-deps.js")'
],
'defines' : [
'CURL_STATICLIB'
]
}, { # OS != "win"
'libraries': [
'<!@(node "<(module_root_dir)/tools/curl-config.js")'
],
'sources!': [
'src/strndup.c' #remove strndup function declaration on non-windows systems.
]
}]
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
]
}