Files
allwpilib/gmock/build.gradle
Thad House 9c804c1351 Fixes builds with skipAthena and onlyAthena, and mac builds (#613)
Did these in cscore and the other repos, but forgot about some of the
oddities jenkins has.
2017-08-19 22:15:52 -07:00

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
}
}
}
}
}