32 lines
977 B
Groovy
32 lines
977 B
Groovy
import org.jetbrains.kotlin.CompileCppToBitcode
|
|
|
|
// TODO: consider using some Gradle plugins to build and test
|
|
|
|
targetList.each { targetName ->
|
|
task("${targetName}Runtime", type: CompileCppToBitcode) {
|
|
name "runtime"
|
|
srcRoot file('src/main')
|
|
dependsOn ":common:${targetName}Hash"
|
|
dependsOn "${targetName}Launcher"
|
|
target targetName
|
|
compilerArgs targetArgs[targetName]
|
|
compilerArgs '-I' + project.file('../common/src/hash/headers')
|
|
linkerArgs project.file("../common/build/$targetName/hash.bc").path
|
|
}
|
|
}
|
|
|
|
targetList.each { targetName ->
|
|
task("${targetName}Launcher", type: CompileCppToBitcode) {
|
|
name "launcher"
|
|
srcRoot file('src/launcher')
|
|
target targetName
|
|
compilerArgs targetArgs[targetName]
|
|
compilerArgs '-I' + project.file('../common/src/hash/headers')
|
|
compilerArgs '-I' + project.file('src/main/cpp')
|
|
}
|
|
}
|
|
|
|
task clean << {
|
|
delete buildDir
|
|
}
|