Examples of PlatformToolProvider


Examples of org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider

        TargetedNativeComponentInternal targetedComponent = (TargetedNativeComponentInternal) projectNativeComponent;
        List<NativePlatform> targetPlatforms = platforms.chooseFromTargets(NativePlatform.class, targetedComponent.getTargetPlatforms(), DefaultNativePlatform.getDefault(), defaultPlatforms);

        for (NativePlatform platform: targetPlatforms) {
            NativeToolChainInternal toolChain = (NativeToolChainInternal) toolChainRegistry.getForPlatform(platform);
            PlatformToolProvider toolProvider = toolChain.select((NativePlatformInternal) platform);

            BinaryNamingSchemeBuilder builder = namingSchemeBuilder.withComponentName(projectNativeComponent.getName());
            builder = maybeAddDimension(builder, platform, targetPlatforms);
            executeForEachBuildType(projectNativeComponent, (NativePlatformInternal) platform, builder, toolChain, toolProvider);
        }
View Full Code Here

Examples of org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider

        binariesOutputDir = new File(buildDir, "binaries");
    }

    public void execute(NativeBinarySpec nativeBinary) {
        BinaryNamingScheme namingScheme = ((NativeBinarySpecInternal) nativeBinary).getNamingScheme();
        PlatformToolProvider toolProvider = ((NativeBinarySpecInternal) nativeBinary).getPlatformToolProvider();
        File binaryOutputDir = new File(binariesOutputDir, namingScheme.getOutputDirectoryBase());
        String baseName = nativeBinary.getComponent().getBaseName();

        if (nativeBinary instanceof NativeExecutableBinarySpec) {
            ((NativeExecutableBinarySpec) nativeBinary).setExecutableFile(new File(binaryOutputDir, toolProvider.getExecutableName(baseName)));
        } else if (nativeBinary instanceof SharedLibraryBinarySpec) {
            ((SharedLibraryBinarySpec) nativeBinary).setSharedLibraryFile(new File(binaryOutputDir, toolProvider.getSharedLibraryName(baseName)));
            ((SharedLibraryBinarySpec) nativeBinary).setSharedLibraryLinkFile(new File(binaryOutputDir, toolProvider.getSharedLibraryLinkFileName(baseName)));
        } else if (nativeBinary instanceof StaticLibraryBinarySpec) {
            ((StaticLibraryBinarySpec) nativeBinary).setStaticLibraryFile(new File(binaryOutputDir, toolProvider.getStaticLibraryName(baseName)));
        }
    }
View Full Code Here

Examples of org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider

        spec.source(getSource());
        spec.setMacros(getMacros());
        spec.args(getCompilerArgs());
        spec.setIncrementalCompile(inputs.isIncremental());

        PlatformToolProvider platformToolProvider = toolChain.select(targetPlatform);
        WorkResult result = getIncrementalCompilerBuilder().createIncrementalCompiler(this, platformToolProvider.newCompiler(spec), toolChain).execute(spec);
        setDidWork(result.getDidWork());
    }
View Full Code Here

Examples of org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider

        spec.setMacros(getMacros());
        spec.args(getCompilerArgs());
        spec.setPositionIndependentCode(isPositionIndependentCode());
        spec.setIncrementalCompile(inputs.isIncremental());

        PlatformToolProvider platformToolProvider = toolChain.select(targetPlatform);
        WorkResult result = getIncrementalCompilerBuilder().createIncrementalCompiler(this, platformToolProvider.newCompiler(spec), toolChain).execute(spec);

        setDidWork(result.getDidWork());
    }
View Full Code Here

Examples of org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider

            return instantiator.newInstance(DefaultCUnitTestSuiteBinary.class, cUnitTestSuite, testedBinary, namingScheme, resolver);
        }

        private void configure(DefaultCUnitTestSuiteBinary 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("cCompiler", DefaultPreprocessingTool.class);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.