Remove generator module and replace with compiler and runtime modules

This commit is contained in:
Adam Rosenberger 2014-05-19 08:37:13 -04:00
parent aa9a013475
commit dd286c6e17
29 changed files with 14 additions and 9 deletions

View file

@ -1,7 +1,7 @@
CXX=clang++
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
@ -16,4 +16,4 @@ capnpc-java : $(CAPNPC_JAVA_SOURCES)
addressbook : capnpc-java
PWD=pwd
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

View file

@ -7,22 +7,27 @@ object Build extends sbt.Build {
project(
id = "capnproto-java",
base = file(".")
).aggregate(generator, examples)
).aggregate(compiler, runtime, examples)
.settings(cleanFiles <+= baseDirectory { base => base / "capnpc-java"})
lazy val generator =
lazy val compiler =
project(
id = "generator",
base = file("generator")
).settings(Defaults.itSettings: _*)
.settings(makeCppTask)
id = "compiler",
base = file("compiler")
).settings(makeCppTask)
.settings(compile <<= compile in Compile dependsOn makeCpp)
lazy val runtime =
project(
id = "runtime",
base = file("runtime")
)
lazy val examples =
project(
id = "examples",
base = file("examples")
).dependsOn(generator)
).dependsOn(runtime)
.settings(makeExamplesTask)
.settings(compile <<= compile in Compile dependsOn makeExamples)
.settings(unmanagedSourceDirectories in Compile += sourceDirectory.value / "main" / "generated")