blob: 51ff139a608ddf8512478bd8f8dcc430d0db37cd [file] [log] [blame]
John Park7eb90422018-01-27 12:04:57 -08001import org.gradle.internal.os.OperatingSystem
2
3if (!project.hasProperty('onlyAthena')) {
4 apply plugin: 'cpp'
5 apply plugin: 'visual-studio'
6 apply plugin: 'edu.wpi.first.NativeUtils'
7
8 ext.gmockProject = true
9
10 apply from: '../config.gradle'
11
12 model {
13 components {
14 gmock(NativeLibrarySpec) {
15 sources {
16 cpp {
17 source {
18 srcDirs = ['src', 'gtest/src']
19 includes = ['*-all.cc']
20 }
21 exportedHeaders {
22 srcDirs = ['include', 'gtest/include', '.', 'gtest']
23 includes = ['**/*.h', '**/*.cc']
24 }
25 }
26 }
27 binaries.all {
28 if (toolChain in VisualCpp) {
29 cppCompiler.args '-D_UNICODE', '-DUNICODE', '-DWIN32', '-D_WIN32', '-DSTRICT', '-DWIN32_LEAN_AND_MEAN', '-D_HAS_EXCEPTIONS=1'
30 } else {
31 cppCompiler.args '-Wall', '-Wshadow', '-fexceptions', '-Wextra', '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-pthread', '-fPIC'
32 }
33 }
34 binaries.withType(SharedLibraryBinarySpec) {
35 buildable = false
36 }
37 }
38 }
39 }
40}