Documentation
¶
Index ¶
- Constants
- Variables
- func AddRootPrefix(base string, input string, solutionRoot string) string
- func AddShellPrefix(input string) string
- func AreAbstractionsEmpty(abstractions CompilerAbstractions, languages []string) bool
- func CMakeAddLibrary(name string, buildFiles BuildFiles) string
- func CMakeTargetCompileDefinitions(name string, parent string, scope string, define []interface{}, ...) string
- func CMakeTargetIncludeDirectories(name string, includes ScopeMap) string
- func GetFileOptions(file Files, hasAbstractions bool, delimiter string) string
- func GetLanguage(file Files) string
- func GetScope(file Files) string
- func HasFileAbstractions(files []Files) bool
- func HasFileCustomOptions(file Files) bool
- func HasMapFile(outputList []Output) bool
- func IsCompileMiscEmpty(misc Misc) bool
- func ListCompileDefinitions(defines []interface{}, delimiter string) string
- func ListIncludeDirectories(includes []string, delimiter string) string
- func OutputFiles(outputList []Output) (outputByProducts string, outputFile string, outputType string, ...)
- func QuoteArguments(cmd string) string
- func ReplaceDelimiters(identifier string) string
- type Apis
- type BuildFiles
- type Cbuild
- func (c *Cbuild) AddContextLanguage(language string)
- func (c *Cbuild) AddRootPrefix(base string, input string) string
- func (c *Cbuild) AddRootPrefixes(base string, input []string) []string
- func (c *Cbuild) AdjustRelativePath(option string) string
- func (c *Cbuild) CMakeAddLibraryCustomFile(name string, file Files) string
- func (c *Cbuild) CMakeCreateComponents(contextDir string) error
- func (c *Cbuild) CMakeCreateGroupRecursively(parent string, groups []Groups, parentAbstractions CompilerAbstractions, ...) string
- func (c *Cbuild) CMakeCreateGroups(contextDir string) error
- func (c *Cbuild) CMakeSetFileProperties(file Files, abstractions CompilerAbstractions) string
- func (c *Cbuild) CMakeTargetCompileOptions(name string, scope string, lto bool, misc Misc, preIncludes []string, ...) string
- func (c *Cbuild) CMakeTargetCompileOptionsAbstractions(name string, abstractions CompilerAbstractions, languages []string) string
- func (c *Cbuild) CMakeTargetCompileOptionsGlobal(name string, scope string) string
- func (c *Cbuild) CMakeTargetLinkLibraries(name string, scope string, libraries ...string) string
- func (c *Cbuild) ClassifyFiles(files []Files) BuildFiles
- func (c *Cbuild) CompilerAbstractions(abstractions CompilerAbstractions, language string) string
- func (c *Cbuild) GetAPIFiles(id string) []Files
- func (c *Cbuild) GetCompileOptionsLanguageMap(lto bool, misc Misc, optionsMap *map[string][]string)
- func (c *Cbuild) GetLinkLibraries() (libraries []string)
- func (c *Cbuild) LanguageSpecificCompileOptions(language string, options ...string) string
- func (c *Cbuild) LinkerOptions() (linkerVars string, linkerOptions string)
- func (c *Cbuild) ListGroupsAndComponents() []string
- func (c *Cbuild) MergeIncludes(includes ScopeMap, scope string, parent string, addPaths []string, ...) ScopeMap
- func (c *Cbuild) ProcessorOptions() string
- func (c *Cbuild) SetFileAsmDefines(file Files, parentMiscAsm []string) string
- func (c *Cbuild) SetOptionsFlags(abstractions CompilerAbstractions, language string) string
- type CbuildIndex
- type CbuildSet
- type Cbuilds
- type Clayers
- type CompilerAbstractions
- type Components
- type Contexts
- type Cprojects
- type DependenciesMap
- type Executes
- type Files
- type Generator
- type Groups
- type LanguageMap
- type Linker
- type Maker
- func (m *Maker) AddStepSuffix(name string) string
- func (m *Maker) BuildDependencies() string
- func (m *Maker) CMakeCreateRoots(solutionRoot string) error
- func (m *Maker) CMakeCreateToolchain(index int, contextDir string, inc bool) error
- func (m *Maker) CMakeTargetAddDependencies(name string, dependencies []string) string
- func (m *Maker) CreateCMakeListsImageOnly() error
- func (m *Maker) CreateContextCMakeLists(index int) error
- func (m *Maker) CreateSuperCMakeLists() error
- func (m *Maker) CreateWestCMakeLists(index int) error
- func (m *Maker) ExecutesCommands(executes []Executes) string
- func (m *Maker) GenerateCMakeLists() error
- func (m *Maker) GetContextDependencies(execute string, dependsOn []string, deps DependenciesMap) DependenciesMap
- func (m *Maker) GetExecute(execute string) Executes
- func (m *Maker) GetGeneratedFiles(list []string)
- func (m *Maker) GetIndependentRunAlways(execute string) (elements []string)
- func (m *Maker) ListExecutesIOs(io string, list []string, run string) string
- func (m *Maker) ParseCbuildFile(cbuildFile string) (data Cbuild, err error)
- func (m *Maker) ParseCbuildFiles() error
- func (m *Maker) ParseCbuildIndexFile(cbuildIndexFile string) (data CbuildIndex, err error)
- func (m *Maker) ParseCbuildSetFile(cbuildSetFile string) (data CbuildSet, err error)
- func (m *Maker) ProcessToolchain() error
- type Misc
- type Options
- type Output
- type OutputDirs
- type Packs
- type Params
- type Processor
- type ScopeMap
- type Toolchain
- type Vars
- type West
Constants ¶
View Source
const CMAKE_MIN_REQUIRED = "3.27"
Variables ¶
View Source
var CategoryLanguageMap = map[string]string{
"headerAsm": "ASM",
"headerC": "C",
"headerCpp": "CXX",
"includeAsm": "ASM",
"includeC": "C",
"includeCpp": "CXX",
"sourceAsm": "ASM",
"sourceC": "C",
"sourceCpp": "CXX",
}
View Source
var LanguageReMap = map[string]string{
"asm": "ASM",
"c": "C",
"cpp": "CXX",
"c-cpp": "C,CXX",
}
View Source
var WestToolchainMap = map[string]string{
"AC6": "armclang",
"GCC": "gnuarmemb",
"IAR": "iar",
"CLANG": "llvm",
}
Functions ¶
func AddShellPrefix ¶
func AreAbstractionsEmpty ¶
func AreAbstractionsEmpty(abstractions CompilerAbstractions, languages []string) bool
func CMakeAddLibrary ¶
func CMakeAddLibrary(name string, buildFiles BuildFiles) string
func GetFileOptions ¶
func GetLanguage ¶
func HasFileAbstractions ¶
func HasFileCustomOptions ¶ added in v0.9.1
func HasMapFile ¶ added in v0.9.5
func IsCompileMiscEmpty ¶
func ListCompileDefinitions ¶
func ListIncludeDirectories ¶
func OutputFiles ¶
func QuoteArguments ¶ added in v0.9.1
func ReplaceDelimiters ¶
Types ¶
type BuildFiles ¶
type BuildFiles struct {
Interface bool
Include ScopeMap
Source LanguageMap
Custom LanguageMap
Library []string
Object []string
PreIncludeLocal []string
}
type Cbuild ¶
type Cbuild struct {
BuildDescType struct {
GeneratedBy string `yaml:"generated-by"`
CurrentGenerator struct{} `yaml:"current-generator"`
Solution string `yaml:"solution"`
Project string `yaml:"project"`
Context string `yaml:"context"`
Compiler string `yaml:"compiler"`
Board string `yaml:"board"`
BoardPack string `yaml:"board-pack"`
Device string `yaml:"device"`
DevicePack string `yaml:"device-pack"`
Processor Processor `yaml:"processor"`
Packs []Packs `yaml:"packs"`
Optimize string `yaml:"optimize"`
Debug string `yaml:"debug"`
Warnings string `yaml:"warnings"`
LanguageC string `yaml:"language-C"`
LanguageCpp string `yaml:"language-CPP"`
Lto bool `yaml:"link-time-optimize"`
Misc Misc `yaml:"misc"`
Define []interface{} `yaml:"define"`
DefineAsm []interface{} `yaml:"define-asm"`
AddPath []string `yaml:"add-path"`
AddPathAsm []string `yaml:"add-path-asm"`
OutputDirs OutputDirs `yaml:"output-dirs"`
Output []Output `yaml:"output"`
Components []Components `yaml:"components"`
Apis []Apis `yaml:"apis"`
Linker Linker `yaml:"linker"`
Groups []Groups `yaml:"groups"`
Generators []struct{} `yaml:"generators"`
ConstructedFiles []Files `yaml:"constructed-files"`
Licenses []struct{} `yaml:"licenses"`
West West `yaml:"west"`
} `yaml:"build"`
BaseDir string
ContextRoot string
SolutionRoot string
Languages []string
PreIncludeGlobal []string
LibraryGlobal []string
IncludeGlobal LanguageMap
UserIncGlobal LanguageMap
BuildGroups []string
Toolchain string
GeneratedFiles []string
LinkerLto bool
}
func (*Cbuild) AddContextLanguage ¶
func (*Cbuild) AddRootPrefix ¶ added in v0.9.4
func (*Cbuild) AddRootPrefixes ¶ added in v0.9.4
func (*Cbuild) AdjustRelativePath ¶
func (*Cbuild) CMakeAddLibraryCustomFile ¶ added in v0.9.1
func (*Cbuild) CMakeCreateComponents ¶
func (*Cbuild) CMakeCreateGroupRecursively ¶
func (*Cbuild) CMakeCreateGroups ¶
func (*Cbuild) CMakeSetFileProperties ¶
func (c *Cbuild) CMakeSetFileProperties(file Files, abstractions CompilerAbstractions) string
func (*Cbuild) CMakeTargetCompileOptions ¶
func (*Cbuild) CMakeTargetCompileOptionsAbstractions ¶
func (c *Cbuild) CMakeTargetCompileOptionsAbstractions(name string, abstractions CompilerAbstractions, languages []string) string
func (*Cbuild) CMakeTargetCompileOptionsGlobal ¶
func (*Cbuild) CMakeTargetLinkLibraries ¶
func (*Cbuild) ClassifyFiles ¶
func (c *Cbuild) ClassifyFiles(files []Files) BuildFiles
func (*Cbuild) CompilerAbstractions ¶
func (c *Cbuild) CompilerAbstractions(abstractions CompilerAbstractions, language string) string
func (*Cbuild) GetAPIFiles ¶ added in v0.9.5
func (*Cbuild) GetCompileOptionsLanguageMap ¶
func (*Cbuild) GetLinkLibraries ¶ added in v0.9.2
func (*Cbuild) LanguageSpecificCompileOptions ¶
func (*Cbuild) LinkerOptions ¶
func (*Cbuild) ListGroupsAndComponents ¶
func (*Cbuild) MergeIncludes ¶ added in v0.9.1
func (*Cbuild) ProcessorOptions ¶
func (*Cbuild) SetFileAsmDefines ¶ added in v0.9.1
func (*Cbuild) SetOptionsFlags ¶
func (c *Cbuild) SetOptionsFlags(abstractions CompilerAbstractions, language string) string
type CbuildIndex ¶
type CbuildIndex struct {
BuildIdx struct {
GeneratedBy string `yaml:"generated-by"`
Cdefault string `yaml:"cdefault"`
Csolution string `yaml:"csolution"`
ImageOnly bool `yaml:"image-only"`
TmpDir string `yaml:"tmpdir"`
Cprojects []Cprojects `yaml:"cprojects"`
Cbuilds []Cbuilds `yaml:"cbuilds"`
Executes []Executes `yaml:"executes"`
} `yaml:"build-idx"`
BaseDir string
}
type CompilerAbstractions ¶
type CompilerAbstractions struct {
Debug string
Optimize string
Warnings string
LanguageC string
LanguageCpp string
}
func InheritCompilerAbstractions ¶
func InheritCompilerAbstractions(parent CompilerAbstractions, child CompilerAbstractions) CompilerAbstractions
type Components ¶
type Components struct {
Component string `yaml:"component"`
Condition string `yaml:"condition"`
SelectedBy string `yaml:"selected-by"`
Implements string `yaml:"implements"`
Rtedir string `yaml:"rtedir"`
Optimize string `yaml:"optimize"`
Debug string `yaml:"debug"`
Warnings string `yaml:"warnings"`
LanguageC string `yaml:"language-C"`
LanguageCpp string `yaml:"language-CPP"`
Lto bool `yaml:"link-time-optimize"`
Define []interface{} `yaml:"define"`
DefineAsm []interface{} `yaml:"define-asm"`
Undefine []string `yaml:"undefine"`
AddPath []string `yaml:"add-path"`
AddPathAsm []string `yaml:"add-path-asm"`
DelPath []string `yaml:"del-path"`
Misc Misc `yaml:"misc"`
Files []Files `yaml:"files"`
Generator Generator `yaml:"generator"`
FromPack string `yaml:"from-pack"`
}
type DependenciesMap ¶ added in v0.9.5
type Files ¶
type Files struct {
File string `yaml:"file"`
Category string `yaml:"category"`
Scope string `yaml:"scope"`
Language string `yaml:"language"`
Attr string `yaml:"attr"`
Version string `yaml:"version"`
Optimize string `yaml:"optimize"`
Debug string `yaml:"debug"`
Warnings string `yaml:"warnings"`
LanguageC string `yaml:"language-C"`
LanguageCpp string `yaml:"language-CPP"`
Lto bool `yaml:"link-time-optimize"`
Define []interface{} `yaml:"define"`
DefineAsm []interface{} `yaml:"define-asm"`
Undefine []string `yaml:"undefine"`
AddPath []string `yaml:"add-path"`
AddPathAsm []string `yaml:"add-path-asm"`
DelPath []string `yaml:"del-path"`
Misc Misc `yaml:"misc"`
}
type Groups ¶
type Groups struct {
Group string `yaml:"group"`
Groups []Groups `yaml:"groups"`
Files []Files `yaml:"files"`
Optimize string `yaml:"optimize"`
Debug string `yaml:"debug"`
Warnings string `yaml:"warnings"`
LanguageC string `yaml:"language-C"`
LanguageCpp string `yaml:"language-CPP"`
Lto bool `yaml:"link-time-optimize"`
Define []interface{} `yaml:"define"`
DefineAsm []interface{} `yaml:"define-asm"`
Undefine []string `yaml:"undefine"`
AddPath []string `yaml:"add-path"`
AddPathAsm []string `yaml:"add-path-asm"`
DelPath []string `yaml:"del-path"`
Misc Misc `yaml:"misc"`
}
type LanguageMap ¶
func AppendGlobalIncludes ¶
func AppendGlobalIncludes(includes LanguageMap, elements ScopeMap) LanguageMap
func MergeLanguageCommonIncludes ¶ added in v0.9.2
func MergeLanguageCommonIncludes(languages LanguageMap) LanguageMap
type Maker ¶
func (*Maker) AddStepSuffix ¶ added in v0.9.1
func (*Maker) BuildDependencies ¶ added in v0.9.1
func (*Maker) CMakeCreateRoots ¶ added in v0.9.3
func (*Maker) CMakeCreateToolchain ¶
func (*Maker) CMakeTargetAddDependencies ¶ added in v0.9.1
func (*Maker) CreateCMakeListsImageOnly ¶ added in v0.9.8
func (*Maker) CreateContextCMakeLists ¶
func (*Maker) CreateSuperCMakeLists ¶
func (*Maker) CreateWestCMakeLists ¶ added in v0.9.9
func (*Maker) ExecutesCommands ¶ added in v0.9.4
func (*Maker) GenerateCMakeLists ¶
func (*Maker) GetContextDependencies ¶ added in v0.9.5
func (m *Maker) GetContextDependencies(execute string, dependsOn []string, deps DependenciesMap) DependenciesMap
func (*Maker) GetExecute ¶ added in v0.9.5
func (*Maker) GetGeneratedFiles ¶ added in v0.9.6
func (*Maker) GetIndependentRunAlways ¶ added in v0.9.5
func (*Maker) ListExecutesIOs ¶ added in v0.9.4
func (*Maker) ParseCbuildFile ¶
func (*Maker) ParseCbuildFiles ¶
func (*Maker) ParseCbuildIndexFile ¶
func (m *Maker) ParseCbuildIndexFile(cbuildIndexFile string) (data CbuildIndex, err error)
func (*Maker) ParseCbuildSetFile ¶ added in v0.9.1
func (*Maker) ProcessToolchain ¶
type OutputDirs ¶
type Params ¶
type Params struct {
Runner utils.RunnerInterface
Options Options
InputFile string
InstallConfigs utils.Configurations
}
type Vars ¶
type Vars struct {
CbuildIndex CbuildIndex
CbuildSet CbuildSet
Cbuilds []Cbuild
Contexts []string
EnvVars utils.EnvVars
GeneratedFiles []string
ToolchainConfigs map[*semver.Version]Toolchain
RegisteredToolchains map[*semver.Version]Toolchain
SelectedToolchainVersion []*semver.Version
SelectedToolchainConfig []string
SolutionTmpDir string
SolutionRoot string
SolutionName string
}
Click to show internal directories.
Click to hide internal directories.