aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/uriparser/.yandex_meta/__init__.py
blob: a5e4630685ca8f9e772514baf3049d79e237cb33 (plain) (blame)
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
import os.path

from devtools.yamaker.project import CMakeNinjaNixProject


def uriparser_post_install(self):
    with self.yamakes["test"] as test:
        # switch test framework into gtest
        test.module = "GTEST"
        test.EXPLICIT_DATA = True
        # unbundle uriparser from the library
        test.CFLAGS = []

        # needed for config.h
        test.ADDINCL = [self.arcdir]

        # By default library sources are compiled into the test.
        # Replacing them with a normal PEERDIR
        test.PEERDIR = [self.arcdir]
        test.SRCDIR = []
        test.SRCS = [os.path.basename(src) for src in test.SRCS if src.startswith("test/")]
    self.yamakes["."].PEERDIR.add("contrib/libs/libc_compat")


uriparser = CMakeNinjaNixProject(
    owners=["kikht", "shindo", "g:mds", "g:cpp-contrib"],
    arcdir="contrib/restricted/uriparser",
    nixattr="uriparser",
    put={"testrunner": "test"},
    post_install=uriparser_post_install,
)