v0.2.0 #206

Merged
altavir merged 210 commits from dev into master 2021-02-21 16:33:25 +03:00
4 changed files with 20 additions and 16 deletions
Showing only changes of commit de964af80d - Show all commits

View File

@ -37,7 +37,7 @@ jobs:
key: ${{ runner.os }}-konan-1.4.20-eap-37 key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
build-osx: build-osx:
runs-on: macos-latest runs-on: macos-latest
@ -67,7 +67,7 @@ jobs:
key: ${{ runner.os }}-konan-1.4.20-eap-37 key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
- name: Build with Gradle - name: Build with Gradle
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -11,8 +11,8 @@ kotlin {
explicitApiWarning() explicitApiWarning()
val nativeTarget = when (System.getProperty("os.name")) { val nativeTarget = when (System.getProperty("os.name")) {
"Mac OS X" -> macosX64("native") "Mac OS X" -> macosX64()
"Linux" -> linuxX64("native") "Linux" -> linuxX64()
else -> { else -> {
logger.warn("Current OS cannot build any of kmath-gsl targets.") logger.warn("Current OS cannot build any of kmath-gsl targets.")
@ -22,16 +22,14 @@ kotlin {
val main by nativeTarget.compilations.getting { val main by nativeTarget.compilations.getting {
cinterops { cinterops {
val libgsl by creating { val libgsl by creating
includeDirs {
headerFilterOnly("/usr/include/", "/usr/local/")
}
}
} }
} }
val test by nativeTarget.compilations.getting
sourceSets { sourceSets {
val nativeMain by getting { val nativeMain by creating {
val codegen by tasks.creating { val codegen by tasks.creating {
matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt") matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt") vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
@ -43,5 +41,12 @@ kotlin {
api(project(":kmath-core")) api(project(":kmath-core"))
} }
} }
val nativeTest by creating {
dependsOn(nativeMain)
}
main.defaultSourceSet.dependsOn(nativeMain)
test.defaultSourceSet.dependsOn(nativeTest)
} }
} }

View File

@ -1,7 +1,6 @@
package=org.gnu.gsl package=org.gnu.gsl
headers=gsl/gsl_blas.h
headerFilter=gsl/** headerFilter=gsl/**
compilerOpts=-I/usr/include/gsl compilerOpts.linux=-I/usr/include/
linkerOpts=-lgsl compilerOpts.osx=-I/usr/local/
linkerOpts.linux=-L/usr/lib64 -L/usr/lib/x86_64-linux-gnu linkerOpts.linux=-L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lgsl
linkerOpts.osx=-L/opt/local/lib -L/usr/local/lib linkerOpts.osx=-L/opt/local/lib -L/usr/local/lib -lgsl