policy-watcher/binding.gyp
Raymond Zhao f4d328808e
fix: enable some disabled compiler warnings (#10)
* fix: enable some disabled compiler warnings

* chore: use static cast
2023-02-09 05:32:51 -08:00

74 lines
2.4 KiB
Python

{
"targets": [
{
"target_name": "vscode-policy-watcher",
"sources": [
"src/main.cc"
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
'cflags!': ['-fno-exceptions'],
'cflags_cc!': ['-fno-exceptions'],
'conditions': [
['OS=="mac"', {
"sources": [
"src/macos/PolicyWatcher.cc",
],
"defines": [
"MACOS",
],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
}],
['OS=="mac" and target_arch=="arm64"', {
"xcode_settings": {
"ARCHS": ["arm64"]
}
}],
['OS=="linux"', {
"sources": [
"src/linux/PolicyWatcher.cc",
],
"defines": [
"LINUX",
]
}],
["OS=='win'", {
"sources": [
"src/windows/PolicyWatcher.cc",
"src/windows/StringPolicy.cc",
"src/windows/NumberPolicy.cc"
],
"defines": [
"WINDOWS",
"_HAS_EXCEPTIONS=1"
],
"libraries": [
"userenv.lib"
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
'AdditionalOptions': [
'/W3',
'/Qspectre',
'/guard:cf',
'-std:c++17',
'/w34244',
'/w34267'
],
},
'VCLinkerTool': {
'AdditionalOptions': [
'/guard:cf'
]
}
},
}],
],
}
]
}