cmakefile

package
v0.0.0-...-e76d75a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package cmakefile contains code to generate a CMake file

Index

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 Open

func Open(name string) *CMakeFile

Open opens a CMake project named |name|.

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

func (cmake *CMakeFile) AddRequiredDefinition(definition string)

AddRequiredDefinition adds |definition| to the macro definitions

func (*CMakeFile) AddRequiredIncludeDir

func (cmake *CMakeFile) AddRequiredIncludeDir(path string)

AddRequiredIncludeDir adds |path| to the header search path

func (*CMakeFile) AddRequiredLibrary

func (cmake *CMakeFile) AddRequiredLibrary(library string)

AddRequiredLibrary adds |library| to the libraries to link with

func (*CMakeFile) AddScript

func (cmake *CMakeFile) AddScript(name string, install bool)

AddScript defines a script to be installed.

func (*CMakeFile) AddSingleFileAsset

func (cmake *CMakeFile) AddSingleFileAsset(SHA256, URL string)

AddSingleFileAsset adds a single-file asset to the build

func (*CMakeFile) AddSingleHeaderDependency

func (cmake *CMakeFile) AddSingleHeaderDependency(SHA256, URL string)

AddSingleHeaderDependency adds a single-header dependency

func (*CMakeFile) AddTest

func (cmake *CMakeFile) AddTest(name, command string)

AddTest defines a test to be run

func (*CMakeFile) Amalgamate

func (cmake *CMakeFile) Amalgamate(dest string, sources []string)

Amalgamate amalgamates files in sources into dest.

func (*CMakeFile) CheckFunctionExists

func (cmake *CMakeFile) CheckFunctionExists(name, define string)

CheckFunctionExists checks whether |name| is a function and defines the |define| preprocessor macro in such case.

func (*CMakeFile) CheckSymbolExists

func (cmake *CMakeFile) CheckSymbolExists(name, header, define string)

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

func (cmake *CMakeFile) DownloadAndExtractArchive(SHA256, URL string)

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

func (cmake *CMakeFile) RequireHeaderExists(header string)

RequireHeaderExists requires that |header| exists.

func (*CMakeFile) RequireLibraryExists

func (cmake *CMakeFile) RequireLibraryExists(library, function string)

RequireLibraryExists requires that |function| exists in |library|.

func (*CMakeFile) Win32InstallPrebuilt

func (cmake *CMakeFile) Win32InstallPrebuilt(pkg *prebuilt.Package)

Win32InstallPrebuilt installs a prebuilt Windows package.

func (*CMakeFile) WithIndent

func (cmake *CMakeFile) WithIndent(indent string, fn func())

WithIndent runs |func| with the specified |indent|.

func (*CMakeFile) WriteLine

func (cmake *CMakeFile) WriteLine(s string)

WriteLine writes a line to the CMakeLists.txt file.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址