Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19850

Use Clang native toolchain from Kotlin build.gradle.kts

$
0
0

I am building a native C++ application under Linux, using Gradle’s cpp-application plugin. I wish to use the Clang toolchain, not the Gcc toolchain. If I were using a Groovy-based build.gradle, then I could switch to the Clang toolchain using:

model {
	toolChains {
		clang Clang
	}
}

However, the Gradle Kotlin DSL does not support model {}, which will eventually be retired anyway. Is there any way to accomplish the same switch from Gcc to Clang when using a Kotlin-based build.gradle.kts?


Viewing all articles
Browse latest Browse all 19850

Trending Articles