diff options
Diffstat (limited to 'runtime/org.eclipse.etrice.modellib.cpp/build.gradle')
-rw-r--r-- | runtime/org.eclipse.etrice.modellib.cpp/build.gradle | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/build.gradle b/runtime/org.eclipse.etrice.modellib.cpp/build.gradle new file mode 100644 index 000000000..3299defba --- /dev/null +++ b/runtime/org.eclipse.etrice.modellib.cpp/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'cpp' +} + +def generator = ':plugins:org.eclipse.etrice.generator.cpp' + +task generate(type: JavaExec, group: 'build', dependsOn: "$generator:classes") { + main = project(generator).mainClassName + classpath = project(generator).classpath + inputs.dir 'model' + outputs.dir 'src-gen' + args '-lib', '-msc_instr', '-genDir', 'src-gen', + 'model/TimingService.room' +} + +model { + components { + etrice_modellib_cpp(NativeLibrarySpec) { + sources.cpp { + builtBy generate + source { + srcDirs = ['src-gen'] + include '**/*.cpp' + } + exportedHeaders { + srcDirs = ['src-gen'] + } + lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'api' + lib project: ':runtime:org.eclipse.etrice.runtime.cpp', library: 'etrice_runtime_cpp', linkage: 'api' + } + binaries { + withType(SharedLibraryBinarySpec) { buildable = false } + all { cppCompiler.args '-g3' } + } + } + } +} + +clean.delete 'src-gen'
\ No newline at end of file |