Documentation
¶
Overview ¶
Package cmakefile contains code to generate a CMake file
Index ¶
- type CMakeFile
- func (cmake *CMakeFile) AddExecutable(name string, sources []string, libs []string, install bool)
- func (cmake *CMakeFile) AddLibrary(name string, sources []string, libs []string, install bool, headers []string)
- func (cmake *CMakeFile) AddRequiredDefinition(definition string)
- func (cmake *CMakeFile) AddRequiredIncludeDir(path string)
- func (cmake *CMakeFile) AddRequiredLibrary(library string)
- func (cmake *CMakeFile) AddScript(name string, install bool)
- func (cmake *CMakeFile) AddSingleFileAsset(SHA256, URL string)
- func (cmake *CMakeFile) AddSingleHeaderDependency(SHA256, URL string)
- func (cmake *CMakeFile) AddTest(name, command string)
- func (cmake *CMakeFile) Amalgamate(dest string, sources []string)
- func (cmake *CMakeFile) CheckFunctionExists(name, define string)
- func (cmake *CMakeFile) CheckSymbolExists(name, header, define string)
- func (cmake *CMakeFile) Close()
- func (cmake *CMakeFile) DownloadAndExtractArchive(SHA256, URL string)
- func (cmake *CMakeFile) FinalizeCompilerFlags()
- func (cmake *CMakeFile) IfAPPLE(thenFunc func(), elseFunc func())
- func (cmake *CMakeFile) IfWIN32(thenFunc func(), elseFunc func())
- func (cmake *CMakeFile) RequireHeaderExists(header string)
- func (cmake *CMakeFile) RequireLibraryExists(library, function string)
- func (cmake *CMakeFile) Win32InstallPrebuilt(pkg *prebuilt.Package)
- func (cmake *CMakeFile) WithIndent(indent string, fn func())
- func (cmake *CMakeFile) WriteLine(s string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMakeFile ¶
type CMakeFile struct {
// contains filtered or unexported fields
}
CMakeFile is a CMakeListst.txt file
func (*CMakeFile) AddExecutable ¶
func (cmake *CMakeFile) AddExecutable( name string, sources []string, libs []string, install bool, )
AddExecutable defines an executable to be compiled.
func (*CMakeFile) AddLibrary ¶
func (cmake *CMakeFile) AddLibrary( name string, sources []string, libs []string, install bool, headers []string, )
AddLibrary defines a library to be compiled.
func (*CMakeFile) AddRequiredDefinition ¶
AddRequiredDefinition adds |definition| to the macro definitions
func (*CMakeFile) AddRequiredIncludeDir ¶
AddRequiredIncludeDir adds |path| to the header search path
func (*CMakeFile) AddRequiredLibrary ¶
AddRequiredLibrary adds |library| to the libraries to link with
func (*CMakeFile) AddSingleFileAsset ¶
AddSingleFileAsset adds a single-file asset to the build
func (*CMakeFile) AddSingleHeaderDependency ¶
AddSingleHeaderDependency adds a single-header dependency
func (*CMakeFile) Amalgamate ¶
Amalgamate amalgamates files in sources into dest.
func (*CMakeFile) CheckFunctionExists ¶
CheckFunctionExists checks whether |name| is a function and defines the |define| preprocessor macro in such case.
func (*CMakeFile) CheckSymbolExists ¶
CheckSymbolExists checks whether |name| is a symbol in |header| and defines the |define| preprocessor macro in such case.
func (*CMakeFile) Close ¶
func (cmake *CMakeFile) Close()
Close writes CMakeLists.txt in the current directory.
func (*CMakeFile) DownloadAndExtractArchive ¶
DownloadAndExtractArchive downloads and extracts and archive
func (*CMakeFile) FinalizeCompilerFlags ¶
func (cmake *CMakeFile) FinalizeCompilerFlags()
FinalizeCompilerFlags finalizes compiler flags
func (*CMakeFile) IfAPPLE ¶
func (cmake *CMakeFile) IfAPPLE(thenFunc func(), elseFunc func())
IfAPPLE allows you to generate APPLE / !APPLE specific code.
func (*CMakeFile) IfWIN32 ¶
func (cmake *CMakeFile) IfWIN32(thenFunc func(), elseFunc func())
IfWIN32 allows you to generate WIN32 / !WIN32 specific code.
func (*CMakeFile) RequireHeaderExists ¶
RequireHeaderExists requires that |header| exists.
func (*CMakeFile) RequireLibraryExists ¶
RequireLibraryExists requires that |function| exists in |library|.
func (*CMakeFile) Win32InstallPrebuilt ¶
Win32InstallPrebuilt installs a prebuilt Windows package.
func (*CMakeFile) WithIndent ¶
WithIndent runs |func| with the specified |indent|.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package prebuilt helps to define prebuilt packages
|
Package prebuilt helps to define prebuilt packages |
|
Package restrictiveflags allows to set restrictive compiler flags
|
Package restrictiveflags allows to set restrictive compiler flags |