binding.gyp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. 'targets': [{
  3. 'target_name': 'farmhash',
  4. 'sources': [
  5. 'src/upstream/farmhash.cc',
  6. 'src/bindings.cc'
  7. ],
  8. 'include_dirs' : [
  9. "<!(node -p \"require('node-addon-api').include_dir\")"
  10. ],
  11. 'dependencies': [
  12. "<!(node -p \"require('node-addon-api').gyp\")"
  13. ],
  14. 'cflags_cc': [
  15. '-Wall',
  16. '-Os',
  17. '-funroll-loops'
  18. ],
  19. 'cflags!': [ '-fno-exceptions' ],
  20. 'cflags_cc!': [ '-fno-exceptions' ],
  21. 'conditions': [
  22. ['OS=="win"', {
  23. 'defines': [
  24. 'FARMHASH_OPTIONAL_BUILTIN_EXPECT'
  25. ]
  26. }]
  27. ],
  28. 'xcode_settings': {
  29. 'CLANG_CXX_LIBRARY': 'libc++',
  30. 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
  31. 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
  32. 'MACOSX_DEPLOYMENT_TARGET': '10.7',
  33. 'OTHER_CPLUSPLUSFLAGS': [
  34. '-fexceptions',
  35. '-Wall',
  36. '-Oz',
  37. '-funroll-loops'
  38. ]
  39. },
  40. 'configurations': {
  41. 'Release': {
  42. 'msvs_settings': {
  43. 'VCCLCompilerTool': {
  44. 'ExceptionHandling': 1,
  45. 'Optimization': 1,
  46. 'DisableSpecificWarnings': ['4244', '4307', '4319']
  47. }
  48. }
  49. }
  50. }
  51. }]
  52. }