Skip to content

Commit a521c0b

Browse files
authored
Improve the warning message on incompatible host for a registered native target. (#231)
1 parent 5b97d35 commit a521c0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/main/src/kotlinx/benchmark/gradle/NativeMultiplatformTasks.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ import kotlin.io.path.*
1515
@KotlinxBenchmarkPluginInternalApi
1616
fun Project.processNativeCompilation(target: NativeBenchmarkTarget) {
1717
val compilation = target.compilation
18-
if (compilation.target.konanTarget != HostManager.host) {
19-
project.logger.warn("Skipping benchmarks for '${target.name}' because they cannot be run on current OS: Expected ${HostManager.host}, but was ${compilation.target.konanTarget}")
18+
val expectedHost = compilation.target.konanTarget
19+
val actualHost = HostManager.host
20+
if (expectedHost != actualHost) {
21+
project.logger.warn("Skipping benchmarks for '${target.name}' because they cannot be run on current host '$actualHost' (expected host: '$expectedHost')")
2022
return
2123
}
2224

0 commit comments

Comments
 (0)