summaryrefslogtreecommitdiff
path: root/buildfile
blob: 9dde15524f5e95bd043644cda1996fb14e13bbd8 (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
36
37
38
39
./: vcpkg/ manifest

vcpkg/
{
  ./: toolsrc/

  toolsrc/
  {
    ./: vcpkg/exe{vcpkg} file{VERSION.txt}

    # @@ Specify extensions explicitly because of source file names like
    # commands.edit.cpp. Failed that, we will end up treating, in this case
    # .edit, as a specified extension (because the pattern machinery will
    # remove .cpp from matches that it has added to the pattern).
    #
    # @@ Not clear what's the right place for the excutable.
    #
    vcpkg/exe{vcpkg}: cxx{src/vcpkg/**.cpp   +src/vcpkg} \
                      hxx{include/vcpkg/**.h +include/pch} \
                      fsdir{vcpkg/}

    cxx.poptions =+ -DDISABLE_METRICS=1 "-I$src_base/include"

    # Currently upstream is full of warnings, so disable for now.
    #
    if ($cxx.class == 'gcc')
      cxx.coptions += -Wno-all -Wno-extra

    # For some standard libraries std::filesystem is in a separate library.
    #
    if ($cxx.stdlib == 'libstdc++')
      cxx.libs += -lstdc++fs
    elif ($cxx.stdlib == 'libc++')
      cxx.libs += -lc++experimental

    if ($cxx.target.class == 'windows')
      cxx.libs += bcrypt.lib
  }
}