use of org.gradle.nativeplatform.toolchain.internal.NativeCompileSpec in project gradle by gradle.
the class AbstractNativeCompileTask method compile.
@TaskAction
public void compile(IncrementalTaskInputs inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = createCompileSpec();
spec.setTargetPlatform(targetPlatform.get());
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(objectFileDir.get().getAsFile());
spec.include(includes);
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs().get());
spec.setPositionIndependentCode(isPositionIndependentCode());
spec.setDebuggable(isDebuggable());
spec.setOptimized(isOptimized());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
configureSpec(spec);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
setDidWork(doCompile(spec, platformToolProvider).getDidWork());
}
use of org.gradle.nativeplatform.toolchain.internal.NativeCompileSpec in project gradle by gradle.
the class WindowsResourceCompile method compile.
@TaskAction
public void compile(IncrementalTaskInputs inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = new DefaultWindowsResourceCompileSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getOutputDir());
spec.include(getIncludes());
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
WorkResult result = doCompile(spec, platformToolProvider);
setDidWork(result.getDidWork());
}
use of org.gradle.nativeplatform.toolchain.internal.NativeCompileSpec in project gradle by gradle.
the class WindowsResourceCompile method compile.
@TaskAction
public void compile(InputChanges inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = new DefaultWindowsResourceCompileSpec();
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(getOutputDir());
spec.include(getIncludes());
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs().get());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
WorkResult result = doCompile(spec, platformToolProvider);
setDidWork(result.getDidWork());
}
use of org.gradle.nativeplatform.toolchain.internal.NativeCompileSpec in project gradle by gradle.
the class AbstractNativeCompileTask method compile.
@TaskAction
protected void compile(InputChanges inputs) {
BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());
NativeCompileSpec spec = createCompileSpec();
spec.setTargetPlatform(targetPlatform.get());
spec.setTempDir(getTemporaryDir());
spec.setObjectFileDir(objectFileDir.get().getAsFile());
spec.include(includes);
spec.systemInclude(systemIncludes);
spec.source(getSource());
spec.setMacros(getMacros());
spec.args(getCompilerArgs().get());
spec.setPositionIndependentCode(isPositionIndependentCode());
spec.setDebuggable(isDebuggable());
spec.setOptimized(isOptimized());
spec.setIncrementalCompile(inputs.isIncremental());
spec.setOperationLogger(operationLogger);
configureSpec(spec);
NativeToolChainInternal nativeToolChain = (NativeToolChainInternal) toolChain.get();
NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();
PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);
setDidWork(doCompile(spec, platformToolProvider).getDidWork());
}
Aggregations