aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-install.hxx
blob: 3f257f0a0ec28a42d632671bfa5a9d88e584f3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// file      : bpkg/pkg-install.hxx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

#ifndef BPKG_PKG_INSTALL_HXX
#define BPKG_PKG_INSTALL_HXX

#include <bpkg/types.hxx>
#include <bpkg/utility.hxx>

#include <bpkg/pkg-command.hxx>
#include <bpkg/pkg-install-options.hxx>

namespace bpkg
{
  // Note that we disallow installing packages from the host/build2
  // configurations. The reason for that is that otherwise we can fail, trying
  // to build a package both for install and normally (as a dependency).
  //
  inline int
  pkg_install (const pkg_install_options& o, cli::group_scanner& args)
  {
    return pkg_command ("install",
                        o,
                        "" /* cmd_variant */,
                        o.recursive (),
                        o.immediate (),
                        o.all (),
                        o.all_pattern (),
                        false /* package_cwd */,
                        false /* allow_host_type */,
                        args);
  }
}

#endif // BPKG_PKG_INSTALL_HXX