mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
36 lines
1.1 KiB
Groovy
36 lines
1.1 KiB
Groovy
apply plugin: 'cpp'
|
|
apply plugin: 'visual-studio'
|
|
apply plugin: 'edu.wpi.first.NativeUtils'
|
|
|
|
apply from: "${rootDir}/shared/config.gradle"
|
|
|
|
model {
|
|
components {
|
|
gtest(NativeLibrarySpec) {
|
|
sources {
|
|
cpp {
|
|
source {
|
|
srcDirs = ['src/main/native/cpp', "$buildDir/generated/cpp"]
|
|
include '**/*.cc'
|
|
}
|
|
exportedHeaders {
|
|
srcDirs 'src/main/native/include'
|
|
}
|
|
}
|
|
}
|
|
binaries.all {
|
|
if (toolChain in VisualCpp) {
|
|
cppCompiler.args '-D_UNICODE', '-DUNICODE', '-DWIN32', '-D_WIN32', '-DSTRICT', '-DWIN32_LEAN_AND_MEAN', '-D_HAS_EXCEPTIONS=1'
|
|
} else {
|
|
cppCompiler.args '-Wshadow', '-fexceptions', '-Wno-missing-field-initializers'
|
|
}
|
|
}
|
|
binaries.withType(SharedLibraryBinarySpec) {
|
|
buildable = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
apply from: 'publish.gradle'
|