-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (48 loc) · 1.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
plugins {
id "jaci.openrio.gradle.GradleRIO" version "2018.01.20" apply false
}
// Only clean our code, don't clean googletest
task subclean();
subprojects {
plugins.withType(CppPlugin).whenPluginAdded {
project.apply plugin: "visual-studio"
rootProject.tasks.subclean.dependsOn tasks.clean
}
plugins.withType(GoogleTestPlugin).whenPluginAdded {
model {
binaries {
withType(GoogleTestTestSuiteBinarySpec) {
lib project: ":", library: "googleTest", linkage: "static"
if (targetPlatform.name == 'roborio') buildable = false; // Don't test on a platform we can't run
}
}
}
}
}
apply plugin: "jaci.openrio.gradle.GradleRIO"
apply plugin: "cpp"
model {
components {
// G Test is build along with the project, but you could easily use your own prebuilt libraries.
googleTest(NativeLibrarySpec) {
targetPlatform 'any64'
sources.cpp {
source {
srcDir 'googletest/src'
include '**/gtest-all.cc'
}
exportedHeaders {
srcDirs 'googletest', 'googletest/include'
include '**/*.hpp', '**/*.h'
}
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}
task visualStudio() {
dependsOn ':robot:frcUserProgramVisualStudio'
dependsOn ':subsystems:subsystemsVisualStudio'
}