compilerOpts

abstract fun compilerOpts(vararg values: String)

The options that are passed to the compiler by the cinterop tool.

Usage example

kotlin {
linuxX64() {
compilations.getByName("main") {
cinterops {
val cinterop by creating {
defFile(project.file("custom.def"))
compilerOpts("-Ipath/to/headers")
}
}
}
}
}

In the example, the -Ipath/to/headers compiler option is passed to the cinterop tool.

Parameters

values

compiler options


abstract fun compilerOpts(values: List<String>)

The options that are passed to the compiler by the cinterop tool.

Usage example

kotlin {
linuxX64() {
compilations.getByName("main") {
cinterops {
val cinterop by creating {
defFile(project.file("custom.def"))
compilerOpts(listOf("-Ipath/to/headers"))
}
}
}
}
}

In the example, the -Ipath/to/headers compiler option is passed to the cinterop tool.

See also