[K/N][perf] Workaround KGP bug when dirs are queried instantly
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
|
||||
buildscript {
|
||||
ext.rootBuildDirectory = file('../..')
|
||||
|
||||
ext {
|
||||
def properties = new java.util.Properties()
|
||||
properties.load(new java.io.FileReader(project.file("$rootBuildDirectory/../gradle.properties")))
|
||||
properties.each { k, v->
|
||||
properties.each { k, v ->
|
||||
def key = k as String
|
||||
def value = project.findProperty(key) ?: v
|
||||
project.logger.info("${project.name} $key: $value")
|
||||
@@ -115,35 +117,42 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
fromPreset(presets.mingwX64, 'windows') {
|
||||
binaries.all {
|
||||
linkerOpts = ["-L${getMingwPath()}/lib".toString()]
|
||||
}
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly "${getMingwPath()}/include"
|
||||
if (HostManager.hostIsMingw) {
|
||||
fromPreset(presets.mingwX64, 'windows') {
|
||||
binaries.all {
|
||||
linkerOpts = ["-L${getMingwPath()}/lib".toString()]
|
||||
}
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly "${getMingwPath()}/include"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fromPreset(presets.linuxX64, 'linux') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/usr/include', '/usr/include/x86_64-linux-gnu'
|
||||
if (HostManager.hostIsLinux) {
|
||||
fromPreset(presets.linuxX64, 'linux') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/usr/include', '/usr/include/x86_64-linux-gnu'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fromPreset(presets.macosX64, 'macosX64') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
|
||||
|
||||
if (HostManager.hostIsMac) {
|
||||
fromPreset(presets.macosX64, 'macosX64') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fromPreset(presets.macosArm64, 'macosArm64') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
|
||||
fromPreset(presets.macosArm64, 'macosArm64') {
|
||||
compilations.main.cinterops {
|
||||
libcurl {
|
||||
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,7 +162,7 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
configure([findByName('windows'), findByName('linux'), findByName('macosX64'), findByName('macosArm64')]) {
|
||||
configure([findByName('windows'), findByName('linux'), findByName('macosX64'), findByName('macosArm64')].findAll { it != null }) {
|
||||
def isCurrentHost = (name == getHostName())
|
||||
compilations.all {
|
||||
cinterops.all {
|
||||
|
||||
Reference in New Issue
Block a user