2015-09-24 23:32:55 -04:00
|
|
|
apply plugin: 'google-test'
|
|
|
|
|
|
|
|
|
|
model {
|
|
|
|
|
testSuites {
|
|
|
|
|
ntcoreTest {
|
|
|
|
|
if (!project.hasProperty('skipJava')) {
|
|
|
|
|
setupJniIncludes(binaries)
|
|
|
|
|
}
|
|
|
|
|
sources {
|
|
|
|
|
cpp {
|
|
|
|
|
source {
|
2015-11-24 15:58:28 -05:00
|
|
|
srcDirs = ['../test/unit']
|
2015-09-24 23:32:55 -04:00
|
|
|
includes = ['**/*.cpp']
|
|
|
|
|
}
|
|
|
|
|
exportedHeaders {
|
2015-11-24 15:58:28 -05:00
|
|
|
srcDirs = ['../include', '../src', '../gmock/include', '../gmock/gtest/include']
|
2015-09-24 23:32:55 -04:00
|
|
|
includes = ['**/*.h']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
binaries.all {
|
2015-11-24 15:58:28 -05:00
|
|
|
lib project: ':gmock', library: 'gmock', linkage: 'static'
|
|
|
|
|
lib library: 'ntcore', linkage: 'static'
|
2015-09-24 23:32:55 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
binaries.withType(GoogleTestTestSuiteBinarySpec) {
|
2015-11-24 15:58:28 -05:00
|
|
|
lib project: ':gmock', library: "gmock", linkage: "static"
|
|
|
|
|
lib library: 'ntcore', linkage: 'static'
|
2015-10-31 18:46:49 -04:00
|
|
|
if (targetPlatform.operatingSystem.windows) {
|
|
|
|
|
cppCompiler.args '/EHsc', '/DNOMINMAX', '/D_SCL_SECURE_NO_WARNINGS', '/D_WINSOCK_DEPRECATED_NO_WARNINGS'
|
|
|
|
|
} else {
|
2015-09-24 23:32:55 -04:00
|
|
|
cppCompiler.args '-pthread', '-std=c++1y'
|
|
|
|
|
linker.args '-pthread'
|
|
|
|
|
}
|
|
|
|
|
}
|