apply plugin: 'google-test' task check() {} model { testSuites { ntcoreTest { if (!project.hasProperty('skipJava')) { setupJniIncludes(binaries) } sources { cpp { source { srcDirs = ['test/unit'] includes = ['**/*.cpp'] } exportedHeaders { srcDirs = ['include', 'src', 'gmock/include', 'gmock/gtest/include'] includes = ['**/*.h'] } } } binaries.all { if (project.hasProperty('wpilib')) { lib project: ':ntcore:gmock', library: "gmock", linkage: "static" } else { lib project: ':gmock', library: "gmock", linkage: "static" } } } } } binaries.withType(GoogleTestTestSuiteBinarySpec) { if (project.hasProperty('wpilib')) { lib project: ':ntcore:gmock', library: "gmock", linkage: "static" } else { lib project: ':gmock', library: "gmock", linkage: "static" } if (targetPlatform.operatingSystem.linux) { cppCompiler.args '-pthread', '-std=c++1y' linker.args '-pthread' } else { cppCompiler.args '/EHsc', '/DNOMINMAX', '/D_SCL_SECURE_NO_WARNINGS', '/D_WINSOCK_DEPRECATED_NO_WARNINGS' } }