mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Did these in cscore and the other repos, but forgot about some of the oddities jenkins has.
45 lines
1.5 KiB
Groovy
45 lines
1.5 KiB
Groovy
import org.gradle.internal.os.OperatingSystem
|
|
|
|
if (!project.hasProperty('onlyAthena')) {
|
|
apply plugin: 'cpp'
|
|
apply plugin: 'visual-studio'
|
|
apply plugin: 'edu.wpi.first.NativeUtils'
|
|
|
|
ext.gmockProject = true
|
|
|
|
apply from: '../config.gradle'
|
|
|
|
ext.addGmockToLinker = { binary->
|
|
binary.lib project: ':gmock', library: 'gmock', linkage: 'static'
|
|
}
|
|
|
|
model {
|
|
components {
|
|
gmock(NativeLibrarySpec) {
|
|
sources {
|
|
cpp {
|
|
source {
|
|
srcDirs = ['src', 'gtest/src']
|
|
includes = ['*-all.cc']
|
|
}
|
|
exportedHeaders {
|
|
srcDirs = ['include', 'gtest/include', '.', 'gtest']
|
|
includes = ['**/*.h', '**/*.cc']
|
|
}
|
|
}
|
|
}
|
|
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 '-Wall', '-Wshadow', '-fexceptions', '-Wextra', '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-pthread', '-fPIC'
|
|
}
|
|
}
|
|
binaries.withType(SharedLibraryBinarySpec) {
|
|
buildable = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|