Split C and C++ libraries, so that you can use C++ compiler flags. Build with

C++17.
This commit is contained in:
David Given
2023-10-24 22:00:09 +02:00
parent 44fc532d63
commit ca6b90f8c1
9 changed files with 54 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
from os.path import join
from build.ab import Rule, Targets, emit, normalrule, filenamesof, flatten
from build.c import clibrary
from build.c import cxxlibrary
import build.pkg
from types import SimpleNamespace
@@ -57,7 +57,7 @@ def protocc(self, name, srcs: Targets = [], deps: Targets = []):
f: join(r.normalrule.objdir, f) for f in outs if f.endswith(".pb.h")
}
clibrary(
cxxlibrary(
replaces=self,
srcs=[f"{name}_srcs"],
hdrs=headers,