kmath/kmath-gsl/build.gradle.kts

53 lines
1.3 KiB
Plaintext
Raw Normal View History

@file:Suppress("UNUSED_VARIABLE")
import kscience.kmath.gsl.codegen.matricesCodegen
2020-10-05 13:46:41 +03:00
import kscience.kmath.gsl.codegen.vectorsCodegen
plugins {
2020-10-04 10:10:53 +03:00
id("ru.mipt.npm.mpp")
}
kotlin {
explicitApiWarning()
2020-10-04 11:53:24 +03:00
val nativeTarget = when (System.getProperty("os.name")) {
"Mac OS X" -> macosX64()
2020-11-29 12:12:41 +03:00
"Linux" -> linuxX64()
2020-10-04 11:53:24 +03:00
else -> {
logger.warn("Current OS cannot build any of kmath-gsl targets.")
return@kotlin
}
2020-10-04 10:10:53 +03:00
}
val main by nativeTarget.compilations.getting {
cinterops {
val libgsl by creating
}
}
val test by nativeTarget.compilations.getting
sourceSets {
2020-11-29 12:12:41 +03:00
val nativeMain by creating {
2020-10-10 23:37:04 +03:00
val codegen by tasks.creating {
matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
}
kotlin.srcDirs(files().builtBy(codegen))
dependencies {
api(project(":kmath-core"))
}
}
2020-11-29 12:12:41 +03:00
val nativeTest by creating {
dependsOn(nativeMain)
}
2020-11-29 12:12:41 +03:00
main.defaultSourceSet.dependsOn(nativeMain)
test.defaultSourceSet.dependsOn(nativeTest)
}
2020-10-10 21:24:16 +03:00
}