Class DefaultCCompiler
java.lang.Object
dev.guillermo.gradle.language.c.internal.DefaultCCompiler
- All Implemented Interfaces:
CCompiler,org.gradle.api.component.SoftwareComponent,org.gradle.api.Named
Default C compiler.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanFlag to enable OpenMP support in all compilation tasks.booleanFlag to treat warnings as errors in all compilation tasks.The Dialect of C that should be used for all compilation tasks.User-defined compile options for GCC-compatible toolchains.Macros that should be defined for all compilation tasks.getName()User-defined compile options for Visual Studio or Visual C++ toolchains.voidsetDialect(String dialect) Sets the dialect of C that should be used for all compilation tasks.voidsetEnableOpenMp(boolean enableOpenMp) Sets the flag to enable OpenMP support in all compilation tasks.voidsetFailOnWarning(boolean failOnWarning) Sets the flag to treat warnings as errors in all compilation tasks.voidsetSuppressAllWarnings(boolean suppressAllWarnings) Sets the flag to suppress all warnings in all compilation tasks.booleanFlag to suppress all warnings in all compilation tasks.
-
Constructor Details
-
DefaultCCompiler
Creates a new instance.- Parameters:
name- The compiler name.
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Named
-
getDialect
Description copied from interface:CCompilerThe Dialect of C that should be used for all compilation tasks.- Specified by:
getDialectin interfaceCCompiler- Returns:
- The Dialect of C that should be used for all compilation tasks.
-
setDialect
Sets the dialect of C that should be used for all compilation tasks.- Parameters:
dialect- The dialect of C that should be used for all compilation tasks.
-
getMacros
Description copied from interface:CCompilerMacros that should be defined for all compilation tasks. -
failOnWarning
public boolean failOnWarning()Description copied from interface:CCompilerFlag to treat warnings as errors in all compilation tasks.- Specified by:
failOnWarningin interfaceCCompiler- Returns:
- Flag to treat warnings as errors in all compilation tasks.
-
setFailOnWarning
public void setFailOnWarning(boolean failOnWarning) Sets the flag to treat warnings as errors in all compilation tasks.- Parameters:
failOnWarning- The flag to treat warnings as errors in all compilation tasks.
-
suppressAllWarnings
public boolean suppressAllWarnings()Description copied from interface:CCompilerFlag to suppress all warnings in all compilation tasks.- Specified by:
suppressAllWarningsin interfaceCCompiler- Returns:
- Flag to suppress all warnings in all compilation tasks.
-
setSuppressAllWarnings
public void setSuppressAllWarnings(boolean suppressAllWarnings) Sets the flag to suppress all warnings in all compilation tasks.- Parameters:
suppressAllWarnings- The flag to suppress all warnings in all compilation tasks
-
enableOpenMp
public boolean enableOpenMp()Description copied from interface:CCompilerFlag to enable OpenMP support in all compilation tasks.- Specified by:
enableOpenMpin interfaceCCompiler- Returns:
- Flag to enable OpenMP support in all compilation tasks.
-
setEnableOpenMp
public void setEnableOpenMp(boolean enableOpenMp) Sets the flag to enable OpenMP support in all compilation tasks.- Parameters:
enableOpenMp- The flag to enable OpenMP support in all compilation tasks.
-
getGccOptions
Description copied from interface:CCompilerUser-defined compile options for GCC-compatible toolchains.- Specified by:
getGccOptionsin interfaceCCompiler- Returns:
- User-defined compile options for GCC-compatible toolchains.
-
getVisualCppOptions
Description copied from interface:CCompilerUser-defined compile options for Visual Studio or Visual C++ toolchains.- Specified by:
getVisualCppOptionsin interfaceCCompiler- Returns:
- User-defined compile options for Visual Studio or Visual C++ toolchains.
-