NVSL / cfiddle

MIT License
3 stars 0 forks source link

Support compiling multiple source files into a single binary. #5

Open stevenjswanson opened 1 year ago

stevenjswanson commented 1 year ago

Something like:

build(["foo.cpp", "bar.cpp"]) to compile one executable from both files.

This is in conflict with #4 , potentially.

A common use case is to compile multiple versions of one file and include some additional files that don't change (eg., test harness). So we could provide an extra_source option to build(). So:

build(["foo.cpp", "bar.cpp"], extra_source=["harness.cpp", "helper.cpp"])

Would build a version for foo.cpp and one for bar.cpp.