Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 8ae584694e80ee97a3af74c8d6e9b6a03fef6e99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
plugins {
	id 'cpp'
}

apply from: "$rootDir/gradle/etGenerator.gradle"

def models = [
	'model/TimingService.room'
]

createGeneratorTask('generate', 'cpp', models, 'src-gen', '-lib')

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.cpp', library: 'etrice_runtime_cpp', linkage: 'api'
				lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'api'
			}
			binaries {
				withType(SharedLibraryBinarySpec) { buildable = false }
				all { cppCompiler.args '-g3' }
			}
		}
	}
}

clean.delete 'src-gen'

Back to the top