Enum Command

Source
pub enum Command<'t> {
Show 127 variants AddCompileDefinitions(Box<AddCompileDefinitions<'t>>), AddCompileOptions(Box<AddCompileOptions<'t>>), AddCustomCommand(Box<AddCustomCommand<'t>>), AddCustomTarget(Box<AddCustomTarget<'t>>), AddDefinitions(Box<AddDefinitions<'t>>), AddDependencies(Box<AddDependencies<'t>>), AddExecutable(Box<AddExecutable<'t>>), AddLibrary(Box<AddLibrary<'t>>), AddLinkOptions(Box<AddLinkOptions<'t>>), AddSubdirectory(Box<AddSubdirectory<'t>>), AddTest(Box<AddTest<'t>>), AuxSourceDirectory(Box<AuxSourceDirectory<'t>>), BuildCommand(Box<BuildCommand<'t>>), CreateTestSourceList(Box<CreateTestSourceList<'t>>), DefineProperty(Box<DefineProperty<'t>>), EnableLanguage(Box<EnableLanguage<'t>>), EnableTesting, Export(Box<Export<'t>>), FLTKWrapUI(Box<FLTKWrapUI<'t>>), GetSourceFileProperty(Box<GetSourceFileProperty<'t>>), GetTargetProperty(Box<GetTargetProperty<'t>>), GetTestProperty(Box<GetTestProperty<'t>>), IncludeDirectories(Box<IncludeDirectories<'t>>), IncludeExternalMSProject(Box<IncludeExternalMSProject<'t>>), IncludeRegularExpression(Box<IncludeRegularExpression<'t>>), Install(Box<Install<'t>>), LinkDirectories(Box<LinkDirectories<'t>>), LinkLibraries(Box<LinkLibraries<'t>>), LoadCache(Box<LoadCache<'t>>), Project(Box<Project<'t>>), RemoveDefinitions(Box<RemoveDefinitions<'t>>), SetSourceFileProperties(Box<SetSourceFileProperties<'t>>), SetTargetProperties(Box<SetTargetProperties<'t>>), SetTestsProperties(Box<SetTestsProperties<'t>>), SourceGroup(Box<SourceGroup<'t>>), TargetCompileDefinitions(Box<TargetCompileDefinitions<'t>>), TargetCompileFeatures(Box<TargetCompileFeatures<'t>>), TargetCompileOptions(Box<TargetCompileOptions<'t>>), TargetIncludeDirectories(Box<TargetIncludeDirectories<'t>>), TargetLinkDirectories(Box<TargetLinkDirectories<'t>>), TargetLinkLibraries(Box<TargetLinkLibraries<'t>>), TargetLinkOptions(Box<TargetLinkOptions<'t>>), TargetPrecompileHeaders(Box<TargetPrecompileHeaders<'t>>), TargetSources(Box<TargetSources<'t>>), TryCompile(Box<TryCompile<'t>>), TryRun(Box<TryRun<'t>>), CTestBuild(Box<CTestBuild<'t>>), CTestConfigure(Box<CTestConfigure<'t>>), CTestCoverage(Box<CTestCoverage<'t>>), CTestEmptyBinaryDirectory(Box<CTestEmptyBinaryDirectory<'t>>), CTestMemCheck(Box<CTestMemCheck<'t>>), CTestReadCustomFiles(Box<CTestReadCustomFiles<'t>>), CTestRunScript(Box<CTestRunScript<'t>>), CTestSleep(Box<CTestSleep<'t>>), CTestStart(Box<CTestStart<'t>>), CTestSubmit(Box<CTestSubmit<'t>>), CTestTest(Box<CTestTest<'t>>), CTestUpdate(Box<CTestUpdate<'t>>), CTestUpload(Box<CTestUpload<'t>>), BuildName(Box<BuildName<'t>>), ExecProgram(Box<ExecProgram<'t>>), ExportLibraryDependencies(Box<ExportLibraryDependencies<'t>>), InstallFiles(Box<InstallFiles<'t>>), InstallPrograms(Box<InstallPrograms<'t>>), InstallTargets(Box<InstallTargets<'t>>), LoadCommand(Box<LoadCommand<'t>>), MakeDirectory(Box<MakeDirectory<'t>>), OutputRequiredFiles(Box<OutputRequiredFiles<'t>>), QtWrapCpp(Box<QtWrapCpp<'t>>), QtWrapUi(Box<QtWrapUi<'t>>), Remove(Box<Remove<'t>>), SubdirDepends(Box<SubdirDepends<'t>>), Subdirs(Box<Subdirs<'t>>), UseMangledMesa(Box<UseMangledMesa<'t>>), UtilitySource(Box<UtilitySource<'t>>), VariableRequires(Box<VariableRequires<'t>>), WriteFile(Box<WriteFile<'t>>), Block(Box<Block<'t>>), Break(Box<Break>), CMakeHostSystemInformation(Box<CMakeHostSystemInformation<'t>>), CMakeLanguage(Box<CMakeLanguage<'t>>), CMakeMinimumRequired(Box<CMakeMinimumRequired<'t>>), CMakeParseArguments(Box<CMakeParseArguments<'t>>), CMakePath(Box<CMakePath<'t>>), CMakePolicy(Box<CMakePolicy<'t>>), ConfigureFile(Box<ConfigureFile<'t>>), Continue(Box<Continue>), Else(Box<Else<'t>>), ElseIf(Box<ElseIf<'t>>), EndBlock(Box<EndBlock>), EndForEach(Box<EndForEach<'t>>), EndFunction(Box<EndFunction<'t>>), EndIf(Box<EndIf<'t>>), EndMacro(Box<EndMacro<'t>>), EndWhile(Box<EndWhile<'t>>), ExecuteProcess(Box<ExecuteProcess<'t>>), File(Box<File<'t>>), FindFile(Box<FindFile<'t>>), FindLibrary(Box<FindLibrary<'t>>), FindPackage(Box<FindPackage<'t>>), FindPath(Box<FindPath<'t>>), FindProgram(Box<FindProgram<'t>>), ForEach(Box<ForEach<'t>>), Function(Box<Function<'t>>), GetCMakeProperty(Box<GetCMakeProperty<'t>>), GetDirectoryProperty(Box<GetDirectoryProperty<'t>>), GetFilenameComponent(Box<GetFilenameComponent<'t>>), GetProperty(Box<GetProperty<'t>>), If(Box<If<'t>>), Include(Box<Include<'t>>), IncludeGuard(Box<IncludeGuard>), List(Box<List<'t>>), Macro(Box<Macro<'t>>), MarkAsAdvanced(Box<MarkAsAdvanced<'t>>), Math(Box<Math<'t>>), Message(Box<Message<'t>>), Option(Box<Option<'t>>), Return(Box<Return<'t>>), SeparateArguments(Box<SeparateArguments<'t>>), Set(Box<Set<'t>>), SetDirectoryProperties(Box<SetDirectoryProperties<'t>>), SetProperty(Box<SetProperty<'t>>), SiteName(Box<SiteName<'t>>), String(Box<String<'t>>), Unset(Box<Unset<'t>>), VariableWatch(Box<VariableWatch<'t>>), While(Box<While<'t>>),
}
Expand description

Variants§

§

AddCompileDefinitions(Box<AddCompileDefinitions<'t>>)

Add preprocessor definitions to the compilation of source files.

§

AddCompileOptions(Box<AddCompileOptions<'t>>)

Adds options to the compilation of source files.

§

AddCustomCommand(Box<AddCustomCommand<'t>>)

Add a custom build rule to the generated build system.

§

AddCustomTarget(Box<AddCustomTarget<'t>>)

Add a target with no output so it will always be built.

§

AddDefinitions(Box<AddDefinitions<'t>>)

Add -D define flags to the compilation of source files.

§

AddDependencies(Box<AddDependencies<'t>>)

Add a dependency between top-level targets.

§

AddExecutable(Box<AddExecutable<'t>>)

Add an executable to the project using the specified source files.

§

AddLibrary(Box<AddLibrary<'t>>)

Add a library to the project using the specified source files.

§

AddLinkOptions(Box<AddLinkOptions<'t>>)

Add options to the link step for executable, shared library or module library targets in the current directory and below that are added after this command is invoked.

§

AddSubdirectory(Box<AddSubdirectory<'t>>)

Add a subdirectory to the build.

§

AddTest(Box<AddTest<'t>>)

Add a test to the project to be run by ctest.

§

AuxSourceDirectory(Box<AuxSourceDirectory<'t>>)

Find all source files in a directory.

§

BuildCommand(Box<BuildCommand<'t>>)

Get a command line to build the current project.

§

CreateTestSourceList(Box<CreateTestSourceList<'t>>)

Create a test driver and source list for building test programs.

§

DefineProperty(Box<DefineProperty<'t>>)

Define and document custom properties.

§

EnableLanguage(Box<EnableLanguage<'t>>)

Enable languages (CXX/C/OBJC/OBJCXX/Fortran/etc)

§

EnableTesting

Enable testing for current directory and below.

§

Export(Box<Export<'t>>)

Export targets or packages for outside projects to use them directly from the current project’s build tree, without installation.

§

FLTKWrapUI(Box<FLTKWrapUI<'t>>)

Create FLTK user interfaces Wrappers.

§

GetSourceFileProperty(Box<GetSourceFileProperty<'t>>)

Get a property for a source file.

§

GetTargetProperty(Box<GetTargetProperty<'t>>)

Get a property from a target.

§

GetTestProperty(Box<GetTestProperty<'t>>)

Get a property of the test.

§

IncludeDirectories(Box<IncludeDirectories<'t>>)

Add include directories to the build.

§

IncludeExternalMSProject(Box<IncludeExternalMSProject<'t>>)

Include an external Microsoft project file in a workspace.

§

IncludeRegularExpression(Box<IncludeRegularExpression<'t>>)

Set the regular expression used for dependency checking.

§

Install(Box<Install<'t>>)

Specify rules to run at install time.

§

LinkDirectories(Box<LinkDirectories<'t>>)

Add directories in which the linker will look for libraries.

§

LinkLibraries(Box<LinkLibraries<'t>>)

Link libraries to all targets added later.

§

LoadCache(Box<LoadCache<'t>>)

Load in the values from another project’s CMake cache.

§

Project(Box<Project<'t>>)

Set the name of the project.

§

RemoveDefinitions(Box<RemoveDefinitions<'t>>)

Remove -D define flags added by add_definitions().

§

SetSourceFileProperties(Box<SetSourceFileProperties<'t>>)

Sets properties associated with source files using a key/value paired list.

§

SetTargetProperties(Box<SetTargetProperties<'t>>)

Sets properties on targets.

§

SetTestsProperties(Box<SetTestsProperties<'t>>)

Set a property of the tests.

§

SourceGroup(Box<SourceGroup<'t>>)

Define a grouping for source files in IDE project generation.

§

TargetCompileDefinitions(Box<TargetCompileDefinitions<'t>>)

Add compile definitions to a target.

§

TargetCompileFeatures(Box<TargetCompileFeatures<'t>>)

Add expected compiler features to a target.

§

TargetCompileOptions(Box<TargetCompileOptions<'t>>)

Add compile options to a target.

§

TargetIncludeDirectories(Box<TargetIncludeDirectories<'t>>)

Add include directories to a target.

§

TargetLinkDirectories(Box<TargetLinkDirectories<'t>>)

Add link directories to a target.

§

TargetLinkLibraries(Box<TargetLinkLibraries<'t>>)

Specify libraries or flags to use when linking a given target and/or its dependents.

§

TargetLinkOptions(Box<TargetLinkOptions<'t>>)

Add options to the link step for an executable, shared library or module library target.

§

TargetPrecompileHeaders(Box<TargetPrecompileHeaders<'t>>)

Add a list of header files to precompile.

§

TargetSources(Box<TargetSources<'t>>)

Add sources to a target.

§

TryCompile(Box<TryCompile<'t>>)

Try building some code.

§

TryRun(Box<TryRun<'t>>)

Try compiling and then running some code.

§

CTestBuild(Box<CTestBuild<'t>>)

Perform the CTest Build Step as a Dashboard Client.

§

CTestConfigure(Box<CTestConfigure<'t>>)

Perform the CTest Configure Step as a Dashboard Client.

§

CTestCoverage(Box<CTestCoverage<'t>>)

Perform the CTest Coverage Step as a Dashboard Client.

§

CTestEmptyBinaryDirectory(Box<CTestEmptyBinaryDirectory<'t>>)

Removes a binary directory.

§

CTestMemCheck(Box<CTestMemCheck<'t>>)

Perform the CTest MemCheck Step as a Dashboard Client.

§

CTestReadCustomFiles(Box<CTestReadCustomFiles<'t>>)

Read all the CTestCustom.ctest or CTestCustom.cmake files from the given directory.

§

CTestRunScript(Box<CTestRunScript<'t>>)

Runs a script or scripts much like if it was run from ctest -S.

§

CTestSleep(Box<CTestSleep<'t>>)

Sleeps for some amount of time

§

CTestStart(Box<CTestStart<'t>>)

Starts the testing for a given model

§

CTestSubmit(Box<CTestSubmit<'t>>)

Perform the CTest Submit Step as a Dashboard Client.

§

CTestTest(Box<CTestTest<'t>>)

Perform the CTest Test Step as a Dashboard Client.

§

CTestUpdate(Box<CTestUpdate<'t>>)

Perform the CTest Update Step as a Dashboard Client.

§

CTestUpload(Box<CTestUpload<'t>>)

Upload files to a dashboard server as a Dashboard Client.

§

BuildName(Box<BuildName<'t>>)

Sets the specified variable to a string representing the platform and compiler settings.

§

ExecProgram(Box<ExecProgram<'t>>)

Run an executable program during the processing of the CMakeList.txt file.

§

ExportLibraryDependencies(Box<ExportLibraryDependencies<'t>>)

This command generates an old-style library dependencies file.

§

InstallFiles(Box<InstallFiles<'t>>)

Specifies rules for installing files for a project.

§

InstallPrograms(Box<InstallPrograms<'t>>)

Specifies rules for installing programs for a project.

§

InstallTargets(Box<InstallTargets<'t>>)

Create rules to install the listed targets into the given directory.

§

LoadCommand(Box<LoadCommand<'t>>)

Load a command into a running CMake.

§

MakeDirectory(Box<MakeDirectory<'t>>)

Creates the specified directory.

§

OutputRequiredFiles(Box<OutputRequiredFiles<'t>>)

Approximate C preprocessor dependency scanning.

§

QtWrapCpp(Box<QtWrapCpp<'t>>)

Manually create Qt Wrappers.

§

QtWrapUi(Box<QtWrapUi<'t>>)

Manually create Qt user interfaces Wrappers.

§

Remove(Box<Remove<'t>>)

Removes value from the variable.

§

SubdirDepends(Box<SubdirDepends<'t>>)

Does nothing.

§

Subdirs(Box<Subdirs<'t>>)

Add a list of subdirectories to the build.

§

UseMangledMesa(Box<UseMangledMesa<'t>>)

Copy mesa headers for use in combination with system GL.

§

UtilitySource(Box<UtilitySource<'t>>)

Specify the source tree of a third-party utility.

§

VariableRequires(Box<VariableRequires<'t>>)

Assert satisfaction of an option’s required variables.

§

WriteFile(Box<WriteFile<'t>>)

Write content into a file.

§

Block(Box<Block<'t>>)

Evaluate a group of commands with a dedicated variable and/or policy scope.

§

Break(Box<Break>)

Break from an enclosing foreach or while loop.

§

CMakeHostSystemInformation(Box<CMakeHostSystemInformation<'t>>)

Query various host system information.

§

CMakeLanguage(Box<CMakeLanguage<'t>>)

Call meta-operations on CMake commands.

§

CMakeMinimumRequired(Box<CMakeMinimumRequired<'t>>)

Require a minimum version of cmake.

§

CMakeParseArguments(Box<CMakeParseArguments<'t>>)

Parse function or macro arguments.

§

CMakePath(Box<CMakePath<'t>>)

This command is for the manipulation of paths.

§

CMakePolicy(Box<CMakePolicy<'t>>)

Manage CMake Policy settings.

§

ConfigureFile(Box<ConfigureFile<'t>>)

Copy a file to another location and modify its contents.

§

Continue(Box<Continue>)

Continue to the top of enclosing foreach or while loop.

§

Else(Box<Else<'t>>)

Starts the else portion of an if block.

§

ElseIf(Box<ElseIf<'t>>)

Starts an elseif portion of an if block.

§

EndBlock(Box<EndBlock>)

Ends a list of commands in a block() and removes the scopes created by the block() command.

§

EndForEach(Box<EndForEach<'t>>)

Ends a list of commands in a foreach block.

§

EndFunction(Box<EndFunction<'t>>)

Ends a list of commands in a function block.

§

EndIf(Box<EndIf<'t>>)

Ends a list of commands in an if block.

§

EndMacro(Box<EndMacro<'t>>)

Ends a list of commands in a macro block.

§

EndWhile(Box<EndWhile<'t>>)

Ends a list of commands in a while block.

§

ExecuteProcess(Box<ExecuteProcess<'t>>)

Execute one or more child processes.

§

File(Box<File<'t>>)

File manipulation command.

§

FindFile(Box<FindFile<'t>>)

This command is used to find a full path to named file.

§

FindLibrary(Box<FindLibrary<'t>>)

This command is used to find a library.

§

FindPackage(Box<FindPackage<'t>>)

Find a package

§

FindPath(Box<FindPath<'t>>)

This command is used to find a directory containing the named file.

§

FindProgram(Box<FindProgram<'t>>)

This command is used to find a program.

§

ForEach(Box<ForEach<'t>>)

Evaluate a group of commands for each value in a list.

§

Function(Box<Function<'t>>)

Start recording a function for later invocation as a command.

§

GetCMakeProperty(Box<GetCMakeProperty<'t>>)

Get a global property of the CMake instance.

§

GetDirectoryProperty(Box<GetDirectoryProperty<'t>>)

Get a property of DIRECTORY scope.

§

GetFilenameComponent(Box<GetFilenameComponent<'t>>)

Get a specific component of a full filename.

§

GetProperty(Box<GetProperty<'t>>)

Get a property.

§

If(Box<If<'t>>)

Conditionally execute a group of commands.

§

Include(Box<Include<'t>>)

Load and run CMake code from a file or module.

§

IncludeGuard(Box<IncludeGuard>)

Provides an include guard for the file currently being processed by CMake.

§

List(Box<List<'t>>)

List operations.

§

Macro(Box<Macro<'t>>)

Start recording a macro for later invocation as a command

§

MarkAsAdvanced(Box<MarkAsAdvanced<'t>>)

Mark cmake cached variables as advanced.

§

Math(Box<Math<'t>>)

Evaluate a mathematical expression.

§

Message(Box<Message<'t>>)

Log a message.

§

Option(Box<Option<'t>>)

Provide a boolean option that the user can optionally select.

§

Return(Box<Return<'t>>)

Return from a file, directory or function.

§

SeparateArguments(Box<SeparateArguments<'t>>)

Parse command-line arguments into a semicolon-separated list.

§

Set(Box<Set<'t>>)

Set a normal, cache, or environment variable to a given value.

§

SetDirectoryProperties(Box<SetDirectoryProperties<'t>>)

Set properties of the current directory and subdirectories.

§

SetProperty(Box<SetProperty<'t>>)

Set a named property in a given scope.

§

SiteName(Box<SiteName<'t>>)

Set the given variable to the name of the computer.

§

String(Box<String<'t>>)

String operations.

§

Unset(Box<Unset<'t>>)

Unset a variable, cache variable, or environment variable.

§

VariableWatch(Box<VariableWatch<'t>>)

Watch the CMake variable for change.

§

While(Box<While<'t>>)

Evaluate a group of commands while a condition is true

Trait Implementations§

Source§

impl<'t> Clone for Command<'t>

Source§

fn clone(&self) -> Command<'t>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'t> Debug for Command<'t>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'t> Hash for Command<'t>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'t> Ord for Command<'t>

Source§

fn cmp(&self, other: &Command<'t>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'t> PartialEq for Command<'t>

Source§

fn eq(&self, other: &Command<'t>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'t> PartialOrd for Command<'t>

Source§

fn partial_cmp(&self, other: &Command<'t>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'t> Eq for Command<'t>

Source§

impl<'t> StructuralPartialEq for Command<'t>

Auto Trait Implementations§

§

impl<'t> Freeze for Command<'t>

§

impl<'t> RefUnwindSafe for Command<'t>

§

impl<'t> Send for Command<'t>

§

impl<'t> Sync for Command<'t>

§

impl<'t> Unpin for Command<'t>

§

impl<'t> UnwindSafe for Command<'t>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.