Fix header selection issues, update Gradle
This commit is contained in:
parent
07ad527e0b
commit
de964af80d
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||
- 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:
|
||||
runs-on: macos-latest
|
||||
|
||||
@ -67,7 +67,7 @@ jobs:
|
||||
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||
- 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:
|
||||
runs-on: windows-latest
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -11,8 +11,8 @@ kotlin {
|
||||
explicitApiWarning()
|
||||
|
||||
val nativeTarget = when (System.getProperty("os.name")) {
|
||||
"Mac OS X" -> macosX64("native")
|
||||
"Linux" -> linuxX64("native")
|
||||
"Mac OS X" -> macosX64()
|
||||
"Linux" -> linuxX64()
|
||||
|
||||
else -> {
|
||||
logger.warn("Current OS cannot build any of kmath-gsl targets.")
|
||||
@ -22,16 +22,14 @@ kotlin {
|
||||
|
||||
val main by nativeTarget.compilations.getting {
|
||||
cinterops {
|
||||
val libgsl by creating {
|
||||
includeDirs {
|
||||
headerFilterOnly("/usr/include/", "/usr/local/")
|
||||
}
|
||||
}
|
||||
val libgsl by creating
|
||||
}
|
||||
}
|
||||
|
||||
val test by nativeTarget.compilations.getting
|
||||
|
||||
sourceSets {
|
||||
val nativeMain by getting {
|
||||
val nativeMain by creating {
|
||||
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")
|
||||
@ -43,5 +41,12 @@ kotlin {
|
||||
api(project(":kmath-core"))
|
||||
}
|
||||
}
|
||||
|
||||
val nativeTest by creating {
|
||||
dependsOn(nativeMain)
|
||||
}
|
||||
|
||||
main.defaultSourceSet.dependsOn(nativeMain)
|
||||
test.defaultSourceSet.dependsOn(nativeTest)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package=org.gnu.gsl
|
||||
headers=gsl/gsl_blas.h
|
||||
headerFilter=gsl/**
|
||||
compilerOpts=-I/usr/include/gsl
|
||||
linkerOpts=-lgsl
|
||||
linkerOpts.linux=-L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
|
||||
linkerOpts.osx=-L/opt/local/lib -L/usr/local/lib
|
||||
compilerOpts.linux=-I/usr/include/
|
||||
compilerOpts.osx=-I/usr/local/
|
||||
linkerOpts.linux=-L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lgsl
|
||||
linkerOpts.osx=-L/opt/local/lib -L/usr/local/lib -lgsl
|
||||
|
Loading…
Reference in New Issue
Block a user