Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions exports/taskfiles/utils/boost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ version: "3"

includes:
checksum: "checksum.yaml"
misc: "misc.yaml"
remote: "remote.yaml"

set: ["u", "pipefail"]
shopt: ["globstar"]

# `JOBS` is a special variable name and is used for concurrency related variables to allow users to
# override all concurrency when invoking task. Callers using these tasks should default to `JOBS` to
# propagate any user set value.

tasks:
# Generates `GENERATE_DIR` by copying `SOURCE_DIR` and then running boost's bootstrap step.
#
Expand Down Expand Up @@ -61,18 +66,16 @@ tasks:
# @param {string} BUILD_DIR Directory in which to build boost.
# @param {string} INSTALL_PREFIX Path prefix of where the project should be installed.
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the build command.
# @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
# omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
# default is the number of cores.
# @param {int} [JOBS=G_NPROCS] The maximum number of concurrent processes to use when building. If
# omitted, the number of cores is used.
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
# file should be stored.
build-and-install:
internal: true
vars:
EXTRA_ARGS:
ref: "default (list) .EXTRA_ARGS"
JOBS: >-
{{default "" .JOBS}}
JOBS: "{{default .G_NPROCS .JOBS}}"
requires:
vars: ["GENERATE_DIR", "BUILD_DIR", "INSTALL_PREFIX"]
cmds:
Expand Down Expand Up @@ -121,9 +124,7 @@ tasks:
#
# Boost build-and-install parameters
# @param {string} [BUILD_DIR={{.WORK_DIR}}/boost-build] Directory in which to build the project.
# @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
# omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
# default is the number of cores.
# @param {int} [JOBS] The maximum number of concurrent processes to use when building.
# @param {string[]} [BUILD_AND_INSTALL_ARGS] Any additional arguments to pass to boost's build
# and install command.
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
Expand Down Expand Up @@ -155,8 +156,6 @@ tasks:
{{default (printf "%s/boost-build" .WORK_DIR) .BUILD_DIR}}
BUILD_AND_INSTALL_ARGS:
ref: "default (list) .BUILD_AND_INSTALL_ARGS"
JOBS: >-
{{default "" .JOBS}}
CMAKE_SETTINGS_DIR: >-
{{default "" .CMAKE_SETTINGS_DIR}}
requires:
Expand Down
17 changes: 9 additions & 8 deletions exports/taskfiles/utils/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@ includes:
set: ["u", "pipefail"]
shopt: ["globstar"]

# `JOBS` is a special variable name and is used for concurrency related variables to allow users to
# override all concurrency when invoking task. Callers using these tasks should default to `JOBS` to
# propagate any user set value.

tasks:
# Runs the CMake build step for the given build directory. The caller must have previously called
# `generate` on `BUILD_DIR` for this task to succeed. We purposely omit `sources` and `generates`
# as we defer to `cmake` to decide whether it should perform any actions.
#
# @param {string} BUILD_DIR Directory containing the generated build system to use.
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the build command.
# @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
# omitted, the native build tool's default number is used. See `man cmake`.
# @param {int} [JOBS=G_NPROCS] The maximum number of concurrent processes to use when building. If
# omitted, the number of cores is used.
# @param {string[]} [TARGETS] A list of specific targets to build instead of the default target.
build:
internal: true
label: "{{.TASK}}:{{.BUILD_DIR}}-{{.TARGETS}}-{{.EXTRA_ARGS}}"
vars:
EXTRA_ARGS:
ref: "default (list) .EXTRA_ARGS"
JOBS: >-
{{default "" .JOBS}}
JOBS: "{{default .G_NPROCS .JOBS}}"
TARGETS:
ref: "default (list) .TARGETS"
requires:
Expand Down Expand Up @@ -153,8 +156,7 @@ tasks:
# command.
# @param {string[]} [CMAKE_INSTALL_ARGS] Any additional arguments to pass to the CMake install
# command.
# @param {int} [CMAKE_JOBS] The maximum number of concurrent processes to use when building. If
# omitted, the native build tool's default number is used. See `man cmake`.
# @param {int} [CMAKE_JOBS] The maximum number of concurrent processes to use when building.
# @param {string} [CMAKE_SETTINGS_DIR] The directory where the project's CMake settings file
# should be stored.
# @param {string} [CMAKE_SOURCE_DIR=.] The path, within the extraction directory, containing the
Expand All @@ -172,8 +174,7 @@ tasks:
ref: "default (list) .CMAKE_GEN_ARGS"
CMAKE_INSTALL_ARGS:
ref: "default (list) .CMAKE_INSTALL_ARGS"
CMAKE_JOBS: >-
{{default "" .CMAKE_JOBS}}
CMAKE_JOBS: "{{default .JOBS .CMAKE_JOBS}}"
CMAKE_SETTINGS_DIR: >-
{{default "" .CMAKE_SETTINGS_DIR}}
CMAKE_SOURCE_DIR: >-
Expand Down
4 changes: 4 additions & 0 deletions exports/taskfiles/utils/misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ version: "3"
set: ["u", "pipefail"]
shopt: ["globstar"]

vars:
G_NPROCS:
sh: "getconf _NPROCESSORS_ONLN"

tasks:
replace-text:
desc: "Replaces some text in a file using sed."
Expand Down
Loading