mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[build] Enhance javacpp/setupBuild.gradle with catch2 support (#9022)
This commit is contained in:
@@ -20,7 +20,8 @@ ext {
|
||||
staticGtestConfigs = [:]
|
||||
}
|
||||
|
||||
staticGtestConfigs["${nativeName}Test"] = []
|
||||
def nativeTestSuiteName = project.findProperty('nativeTestSuiteName') ?: "${nativeName}Test"
|
||||
staticGtestConfigs[nativeTestSuiteName] = []
|
||||
|
||||
apply from: "${rootDir}/shared/googletest.gradle"
|
||||
apply from: "${rootDir}/shared/catch2.gradle"
|
||||
@@ -104,7 +105,7 @@ model {
|
||||
}
|
||||
}
|
||||
testSuites {
|
||||
"${nativeName}Test"(GoogleTestTestSuiteSpec) {
|
||||
"${nativeTestSuiteName}"(GoogleTestTestSuiteSpec) {
|
||||
for(NativeComponentSpec c : $.components) {
|
||||
if (c.name == nativeName) {
|
||||
testing c
|
||||
@@ -122,6 +123,11 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nativeTestSuiteName.contains('Catch2')) {
|
||||
binaries.all {
|
||||
lib project: ':thirdparty:catch2', library: 'catch2', linkage: 'static'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
|
||||
Reference in New Issue
Block a user