Documentation
¶
Overview ¶
package cmake provides tools to create, configure and build C & C++ projects using CMake
Index ¶
- func CopyDir(cwd string, src string, dst string) ([]byte, []byte, error)
- func CopyFile(cwd string, file string, dst string) ([]byte, []byte, error)
- func LibraryExists(name string, includeFiles, includeDirs, linkDirs, predefines []string) error
- type Cmake
- func (cmake *Cmake) BuildDefaults() ([]byte, []byte, error)
- func (cmake *Cmake) BuildDefaultsWithConfig(config string) ([]byte, []byte, error)
- func (cmake *Cmake) BuildTarget() ([]byte, []byte, error)
- func (cmake *Cmake) BuildTargetWithConfig(config, target string) ([]byte, []byte, error)
- func (cmake *Cmake) BuildWithTarget(target string) ([]byte, []byte, error)
- func (cmake *Cmake) Configure() ([]byte, []byte, error)
- func (cmake *Cmake) ConfigureRaw() ([]byte, []byte, error)
- func (cmake *Cmake) CreateTempDirs() error
- func (cmake *Cmake) GetCMakeListsTxt() (string, error)
- func (cmake *Cmake) RemoveTempDirs() error
- func (cmake *Cmake) WriteCMakeListsTxt() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LibraryExists ¶
LibraryExists tries to compile a simple program linking to the given library
Types ¶
type Cmake ¶
type Cmake struct { // Configs required for CMakeLists.txt Name string // Executable name IsCpp bool Standard int // CMAKE_C/CXX_STANDARD Files []string IncludeDirs []string LinkLibs []string // Library names or full paths LinkDirs []string // Where should the linker look for libraries Generator string ConfigureFlags []string // Build configuration ConfDir string BuildDir string // contains filtered or unexported fields }
Cmake contains all configuration necessary to configure and build a CMake project
func (*Cmake) BuildDefaults ¶
Build runs cmake build step.
func (*Cmake) BuildDefaultsWithConfig ¶
Build runs cmake default build step with config
func (*Cmake) BuildTarget ¶
Build runs cmake build "Name" target step.
func (*Cmake) BuildTargetWithConfig ¶
Build runs cmake default build step with config
func (*Cmake) BuildWithTarget ¶
Build runs cmake build "Name" target step.
func (*Cmake) ConfigureRaw ¶
Configure runs cmake configuration step without any CI quirks as is.
func (*Cmake) CreateTempDirs ¶
CreateTempDirs creates temporary directories for conf and build dir
func (*Cmake) GetCMakeListsTxt ¶
func (*Cmake) RemoveTempDirs ¶
func (*Cmake) WriteCMakeListsTxt ¶
WriteCMakeListsTxt writes cmake specification to file and returns the file name.