Documentation
¶
Overview ¶
Package bindings implements CMake-style variable bindings. https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#variables
Index ¶
- type Mapping
- func (m *Mapping) Depth() int
- func (m *Mapping) Get(key string) string
- func (m *Mapping) GetCache(key string) string
- func (m *Mapping) GetEnv(key string) string
- func (m *Mapping) Pop()
- func (m *Mapping) Push()
- func (m *Mapping) Set(key, value string)
- func (m *Mapping) SetCache(key, value string)
- func (m *Mapping) SetParent(key, value string)
- func (m *Mapping) Values() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
Mapping is a stack of map[string]string for CMake variables.
func (*Mapping) Get ¶
Get looks from the current scope up to find the nearest value for key. If they key is absent, returns the empty string. This matches the semantics of CMake variable lookup.
func (*Mapping) GetCache ¶
GetCache returns the associated value from the variable cache or an empty string if not found.
func (*Mapping) GetEnv ¶
GetEnv returns the corresponding environment variable or the empty string (not implemented).
func (*Mapping) Set ¶
Set sets a key to a particular value in the current scope. Setting a key to the empty string is equivalent to deleting it, in accordance with CMake semantics.
func (*Mapping) SetCache ¶
SetCache sets a key to a particular value in CACHE scope. Setting a key to the empty string is equivalent to deleting it, in accordance with CMake semantics.