Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Trying to make a 'wscript' file that compiles a c file with one set of cxxflags, and a cpp with a different set of cxxflags...
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
def build(bld):
obj = bld.new_task_gen("cxx")
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-x", "objective-c"]
obj.source = "c-file.c"
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
obj.target = "binding"
obj.source = "cpp-file.cc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment