vcpkg/docs/maintainers/vcpkg_execute_required_process.md
Jack·Boos·Yu 2b20b27b0d
[docs] Fix the automatically generated document URL (#16611)
* [document] Fix the automatically generated document URL

* [docs] Format all documents
2021-03-10 11:56:07 -06:00

1.7 KiB

vcpkg_execute_required_process

The latest version of this document lives in the vcpkg repo.

Execute a process with logging and fail the build if the command fails.

Usage

vcpkg_execute_required_process(
    COMMAND <${PERL}> [<arguments>...]
    WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg>
    LOGNAME <build-${TARGET_TRIPLET}-dbg>
    [TIMEOUT <seconds>]
    [OUTPUT_VARIABLE <var>]
    [ERROR_VARIABLE <var>]
)

Parameters

ALLOW_IN_DOWNLOAD_MODE

Allows the command to execute in Download Mode. See execute_process() override.

COMMAND

The command to be executed, along with its arguments.

WORKING_DIRECTORY

The directory to execute the command in.

LOGNAME

The prefix to use for the log files.

TIMEOUT

Optional timeout after which to terminate the command.

OUTPUT_VARIABLE

Optional variable to receive stdout of the command.

ERROR_VARIABLE

Optional variable to receive stderr of the command.

This should be a unique name for different triplets so that the logs don't conflict when building multiple at once.

Examples

Source

scripts/cmake/vcpkg_execute_required_process.cmake