protected WorkspaceExtension addWorkspaceExtension(Settings settings) {
    ExtensionAware extensionAware = (ExtensionAware) settings.getGradle();

    ExtensionContainer extensionContainer = extensionAware.getExtensions();

    return extensionContainer.create(EXTENSION_NAME, WorkspaceExtension.class, settings);
  }
    private void configure(DefaultGoogleTestTestSuiteBinary testBinary, File buildDir) {
      BinaryNamingScheme namingScheme = testBinary.getNamingScheme();
      PlatformToolProvider toolProvider = testBinary.getPlatformToolProvider();
      File binaryOutputDir =
          new File(new File(buildDir, "binaries"), namingScheme.getOutputDirectoryBase());
      String baseName = testBinary.getComponent().getBaseName();

      testBinary.setExecutableFile(
          new File(binaryOutputDir, toolProvider.getExecutableName(baseName)));

      ((ExtensionAware) testBinary)
          .getExtensions()
          .create("cppCompiler", DefaultPreprocessingTool.class);

      // TODO:DAZ Not sure if this should be here...
      // Need "-pthread" when linking on Linux
      if (testBinary.getToolChain() instanceof GccCompatibleToolChain
          && testBinary.getTargetPlatform().getOperatingSystem().isLinux()) {
        testBinary.getLinker().args("-pthread");
      }
    }