Per source symbol definition

7 views
Skip to first unread message

J Decker

unread,
Aug 24, 2017, 12:34:29 AM8/24/17
to gyp-developer
It doesn't look like there's a way, but I'll ask anyway.

I have a node-gyp project that has a half dozen sources or so, and I want to apply a definition to one of them, any way to specify that?



{
  "targets": [
    {
      "target_name": "sack_vfs",
      
      "sources": [ "vfs_module.cc",
           "src/sack.cc",
           "src/sqlite3.c",
           "com_interface.cc",
           "sql_module.cc",
           "thread_module.cc",
           "jsonParse.cc",
           "tls_interface.cc",
           "srg_module.cc",
          ],
'defines': [
          'TARGETNAME="sack_vfs.node"',
           "__STATIC__","USE_SQLITE","USE_SQLITE_INTERFACE","FORCE_COLOR_MACROS",
           "NO_OPEN_MACRO","NO_FILEOP_ALIAS","JSON_PARSER_MAIN_SOURCE", "SQLITE_ENABLE_LOCKING_STYLE=0"
        ],
....
}


 "SQLITE_ENABLE_LOCKING_STYLE=0"  I would like to only apply to sqlite3.c

Dirk Pranke

unread,
Aug 27, 2017, 12:51:14 PM8/27/17
to J Decker, gyp-developer
Nope, the defines apply to everything in the target; you would have to move sqlite3.c to its own target.

-- Dirk

--

---
You received this message because you are subscribed to the Google Groups "gyp-developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gyp-developer+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages