Remove generator module and replace with compiler and runtime modules
This commit is contained in:
parent
aa9a013475
commit
dd286c6e17
29 changed files with 14 additions and 9 deletions
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
||||||
CXX=clang++
|
CXX=clang++
|
||||||
CXX_FLAGS=-std=c++11 -stdlib=libc++ `pkg-config capnp --cflags --libs`
|
CXX_FLAGS=-std=c++11 -stdlib=libc++ `pkg-config capnp --cflags --libs`
|
||||||
|
|
||||||
CAPNPC_JAVA_SOURCES=generator/src/main/cpp/compiler/capnpc-java.c++
|
CAPNPC_JAVA_SOURCES=compiler/src/main/cpp/capnpc-java.c++
|
||||||
|
|
||||||
.PHONY: all clean addressbook
|
.PHONY: all clean addressbook
|
||||||
|
|
||||||
|
@ -16,4 +16,4 @@ capnpc-java : $(CAPNPC_JAVA_SOURCES)
|
||||||
addressbook : capnpc-java
|
addressbook : capnpc-java
|
||||||
PWD=pwd
|
PWD=pwd
|
||||||
mkdir -p examples/src/main/generated
|
mkdir -p examples/src/main/generated
|
||||||
capnp compile -I$(PWD)/generator/src/main/cpp/compiler --src-prefix=examples/src/main/schema -o./capnpc-java:examples/src/main/generated examples/src/main/schema/addressbook.capnp
|
capnp compile -I$(PWD)/compiler/src/main/cpp --src-prefix=examples/src/main/schema -o./capnpc-java:examples/src/main/generated examples/src/main/schema/addressbook.capnp
|
||||||
|
|
|
@ -7,22 +7,27 @@ object Build extends sbt.Build {
|
||||||
project(
|
project(
|
||||||
id = "capnproto-java",
|
id = "capnproto-java",
|
||||||
base = file(".")
|
base = file(".")
|
||||||
).aggregate(generator, examples)
|
).aggregate(compiler, runtime, examples)
|
||||||
.settings(cleanFiles <+= baseDirectory { base => base / "capnpc-java"})
|
.settings(cleanFiles <+= baseDirectory { base => base / "capnpc-java"})
|
||||||
|
|
||||||
lazy val generator =
|
lazy val compiler =
|
||||||
project(
|
project(
|
||||||
id = "generator",
|
id = "compiler",
|
||||||
base = file("generator")
|
base = file("compiler")
|
||||||
).settings(Defaults.itSettings: _*)
|
).settings(makeCppTask)
|
||||||
.settings(makeCppTask)
|
|
||||||
.settings(compile <<= compile in Compile dependsOn makeCpp)
|
.settings(compile <<= compile in Compile dependsOn makeCpp)
|
||||||
|
|
||||||
|
lazy val runtime =
|
||||||
|
project(
|
||||||
|
id = "runtime",
|
||||||
|
base = file("runtime")
|
||||||
|
)
|
||||||
|
|
||||||
lazy val examples =
|
lazy val examples =
|
||||||
project(
|
project(
|
||||||
id = "examples",
|
id = "examples",
|
||||||
base = file("examples")
|
base = file("examples")
|
||||||
).dependsOn(generator)
|
).dependsOn(runtime)
|
||||||
.settings(makeExamplesTask)
|
.settings(makeExamplesTask)
|
||||||
.settings(compile <<= compile in Compile dependsOn makeExamples)
|
.settings(compile <<= compile in Compile dependsOn makeExamples)
|
||||||
.settings(unmanagedSourceDirectories in Compile += sourceDirectory.value / "main" / "generated")
|
.settings(unmanagedSourceDirectories in Compile += sourceDirectory.value / "main" / "generated")
|
||||||
|
|
Loading…
Reference in a new issue