cmake

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	*BuilderOptions
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(opts *BuilderOptions) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(fuzzTests []string) ([]*build.Result, error)

Build builds the specified fuzz tests with CMake. The fuzz tests must not contain duplicates.

func (*Builder) BuildDir

func (b *Builder) BuildDir() string

func (*Builder) Configure

func (b *Builder) Configure() error

Configure calls cmake to "Generate a project buildsystem" (that's the phrasing used by the CMake man page). Note: This is usually a no-op after the directory has been created once, even if cache variables change. However, if a previous invocation of this command failed during CMake generation and the command is run again, the build step would only result in a very unhelpful error message about missing Makefiles. By reinvoking CMake's configuration explicitly here, we either get a helpful error message or the build step will succeed if the user fixed the issue in the meantime.

func (*Builder) ListFuzzTests

func (b *Builder) ListFuzzTests() ([]string, error)

ListFuzzTests lists all fuzz tests defined in the CMake project after Configure has been run.

func (*Builder) Opts

func (b *Builder) Opts() *BuilderOptions

type BuilderOptions

type BuilderOptions struct {
	ProjectDir string
	Engine     string
	Sanitizers []string
	Parallel   ParallelOptions
	Stdout     io.Writer
	Stderr     io.Writer

	FindRuntimeDeps bool
}

func (*BuilderOptions) Validate

func (opts *BuilderOptions) Validate() error

type ParallelOptions added in v0.1.5

type ParallelOptions struct {
	Enabled bool
	NumJobs uint
}

Jump to

Keyboard shortcuts

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