NAME
bdep-config – manage project build configurations
SYNOPSIS
bdep config add
[options] [prj-spec]
[@cfg-name] cfg-dir
bdep config create [options] [prj-spec]
[@cfg-name] cfg-dir [cfg-args]
bdep config link [options] [prj-spec]
cfg-spec cfg-spec
bdep config unlink [options] [prj-spec] cfg-spec
cfg-spec
bdep config list [options] [prj-spec]
[cfg-spec...]
bdep config move [options] [prj-spec]
cfg-spec cfg-dir
bdep config rename [options] [prj-spec] cfg-spec
cfg-name
bdep config remove [options] [prj-spec]
cfg-spec... | --all|-a
bdep config set [options] [prj-spec]
cfg-spec... | --all|-a
[--[no-]default]
[--[no-]forward]
[--[no-]auto-sync]
cfg-spec = @cfg-name |
--config|-c cfg-dir
prj-spec = --directory|-d prj-dir
cfg-args = [-- [bpkg-options]]
[--existing|-e | (module |
cfg-var)...]
DESCRIPTION
The config command provides the following subcommands
for managing project's build configurations. If no project directory is
specified, then the current working directory is assumed.
CONFIG SUBCOMMANDS
addcreate- The
addsubcommand adds an existingbpkg(1)build configuration in directorycfg-dirto the project's build configuration set. Thecreatesubcommand creates a new configuration in directorycfg-dirby executing thebpkg-cfg-create(1)command and passing to itcfg-args, if any. It then proceeds asaddby adding the new configuration to the project's build configuration set.In both subcommands, if
cfg-nameis specified, then the added configuration is given this name. Severalbdepcommands can use such names as a more convenient way to specify build configurations (seebdep-projects-configs(1)for details).As a shortcut, if
cfg-nameis not specified andcfg-diris a simple path that starts with@, then it is treated as the name and the configuration directory is assumed to beprj-dir-cfg-name. Note that in case ofcreate,cfg-dirmust be preceded with--(double dash) option to disambiguate it from@cfg-name. For example, assuming the project directory ishello:$ bdep config add @clang # ../hello-clang $ bdep config create -- @gcc cc config.cxx=g++ # ../hello-gcc
A configuration also has a type that is specified with the
--typeoption (or--config-typefrombdep-new(1)). If the type is not specified explicitly, thentargetis assumed. Seebpkg-cfg-create(1)for background on configuration types.Unless the
--no-defaultoption is specified, the first added or created build configuration of each type is designated as the default. Severalbdepcommands use such a configuration by default if no configuration was specified explicitly (seebdep-projects-configs(1)for details). To make a subsequently added configuration the default use the--defaultoption. Note also that in case of multiple default configurations any given package within a project can only be initialized in one such configuration.The default build configuration of each type is also designated as forwarded unless the
--no-forwardoption is specified or another configuration of this type is already designated as forwarded. When a project is initialized in a forwarded build configuration, its source directory is configured to forward to this configuration (seeb(1)for details on forwarded configurations). To designate a non-default configuration as forwarded use the--forwardoption. Note also that it is possible to have multiple forwarded configurations, however, any given package within a project can only be initialized in one such configuration.Unless the
--no-auto-syncoption is specified, an added or created build configuration will be automatically synchronized on every build system invocation. Note that this flag affects the entire build configuration and if multiple projects share the same configuration, then they must have a consistent auto-synchronization setting. link- The
linksubcommand links the first specified build configuration with the second by executing thebpkg-cfg-link(1)command. Seebpkg-cfg-create(1)for background on linked configurations. unlink- The
unlinksubcommand unlinks the first specified build configuration from the second by executing thebpkg-cfg-unlink(1)command. Seebpkg-cfg-create(1)for background on linked configurations. list- The
listsubcommand prints the list of build configurations associated with the project. Unless one or more configurations are specified explicitly,listprints all the associate configurations. Note that the output is written tostdout, notstderr.If the output format is
json(see the--stdout-formatcommon option), then the output is a JSON array of objects which are the serialized representation of the following C++structconfiguration:struct package { string name; }; struct configuration { uint64_t id; string path; optional<string> name; string type; bool default; bool forward; bool auto_sync; vector<package> packages; };For example:
[ { "id": 1, "path": "/tmp/hello-gcc", "name": "gcc", "type": "target", "default": true, "forward": true, "auto_sync": true, "packages": [ { "name": "hello" } ] } ]See the JSON OUTPUT section in
bdep-common-options(1)for details on the overall properties of this format and the semantics of thestructserialization.The
idmember is a numeric configuration id that can be used to identify the configuration instead of the name or path (see the--config-idoption). Thepathmember is an absolute path to the configuration directory. Thepackagesmember contains the array of packages belonging to this project that have been initialized in this configuration. See thecreatesubcommand for the meaning of other members (name,type,default, etc). move- The
movesubcommand assigns the specified build configuration a new directory. It is normally used after moving/renaming the configuration directory. Note that an explicitbdep-sync(1)command is required for this change to take effect. Seebdep-projects-configs(1)for various ways to specify a build configuration. rename- The
renamesubcommand gives the specified build configuration a new name. Seebdep-projects-configs(1)for various ways to specify a build configuration. remove- The
removesubcommand removes one or more build configurations from the project's build configuration set. Note that only configurations that have no initialized packages can be removed. Seebdep-projects-configs(1)for various ways to specify build configurations. set- The
setsubcommand modifies various properties of one or more build configurations associated with the project. Seebdep-projects-configs(1)for various ways to specify build configurations.The properties that can be modified include the default (
--[no-]default), forward (--[no-]forward), and auto-synchronization (--[no-]auto-sync) flags. Note that changing any of these flags requires an explicitbdep-sync(1)command to take effect.
CONFIG OPTIONS
COMMON OPTIONS
The common options are summarized below with a more detailed description
available in bdep-common-options(1).
DEFAULT OPTIONS FILES
See bdep-default-options-files(1)
for an overview of the default options files. For the
config command the search start directory is the project
directory. The following options files are searched for in each directory
and, if found, loaded in the order listed:
bdep.options bdep-config.options bdep-config-add.options # if the create subcommand bdep-config-<subcommand>.options # (subcommand-dependent)
The following config command options cannot be
specified in the default options files:
--directory|-d --wipe
BUGS
Send bug reports to the users@build2.org mailing list.