Gradle offers a plugin which compiler cpp-library
build.gradle.kts
plugins {
`cpp-library`
}
library {
targetMachines.add(machines.windows.x86_64)
linkage.set(listOf(Linkage.SHARED))
source.from("src/main/cpp/*.txt")
}
I am getting below output
:compileDebugCpp NO-SOURCE
How to use the source.from to specify custom file extension like *.txt
I found the solution my self
I need to put the source in the compilation task as below
this allow the gradle C++ compiler task compile
.txtfiles instead of.cppfileSo in case if I want to compiler
fortranthen I can put*.for*.f90