File: scip.BUILD

package info (click to toggle)
tensorflow 2.14.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 359,396 kB
  • sloc: cpp: 2,418,453; python: 736,954; java: 20,254; ansic: 18,962; sh: 9,279; pascal: 7,941; objc: 1,584; xml: 988; ada: 727; cs: 273; perl: 150; makefile: 92
file content (124 lines) | stat: -rw-r--r-- 3,155 bytes parent folder | download | duplicates (7)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
exports_files(
    ["src/lpi/lpi_glop.cpp"],
)

config_setting(
    name = "on_linux",
    constraint_values = [
        "@platforms//os:linux",
    ],
)

config_setting(
    name = "on_macos",
    constraint_values = [
        "@platforms//os:macos",
    ],
)

config_setting(
    name = "on_windows",
    constraint_values = [
        "@platforms//os:windows",
    ],
)

PLATFORM_FLAGS = select({
    "on_linux": [
        "-Wunknown-pragmas",
        "-fexceptions",
        "-DSYM=bliss",
    ],
    "on_macos": [
        "-Wunknown-pragmas",
        "-fexceptions",
        "-DSYM=bliss",
    ],
    "on_windows": [
        "/DSYM=none",
        "/DSCIP_NO_SIGACTION",
        "/DSCIP_NO_STRTOK_R",
    ],
    "//conditions:default": [],
})

PLATFORM_DEPS = select({
    "on_linux": ["@bliss//:libbliss"],
    "on_macos": ["@bliss//:libbliss"],
    "on_windows": [],
    "//conditions:default": [],
})

BLISS_FILE = select({
    "on_linux": ["src/symmetry/compute_symmetry_bliss.cpp"],
    "on_macos": ["src/symmetry/compute_symmetry_bliss.cpp"],
    "on_windows": ["src/symmetry/compute_symmetry_none.cpp"],
    "//conditions:default": ["src/symmetry/compute_symmetry_none.cpp"],
})

# TODO(ckstanton): Remove glob.
cc_library(
    name = "libscip",
    srcs = glob(
        [
            "src/*/*.c",
        ],
        exclude = [
            "src/lpi/lpi_*.c",
            "src/scip/exprinterpret_*.c",
            "src/scip/nlpi_filtersqp.c",
            "src/scip/nlpi_worhp.c",
            "src/scip/compr_xyz.c",
            "src/scip/sorttpl.c",
            "src/symmetry/compute_symmetry_*.cpp",
            "src/tpi/tpi_*.c",
        ],
    ) + BLISS_FILE + [
        "src/scip/exprinterpret_none.c",
        "src/tpi/tpi_tnycthrd.c",
    ],
    hdrs = glob(
        [
            "src/*/*.h",
            "src/*/*.hpp",
            "src/scip/githash.c",
            "src/scip/sorttpl.c",
            "src/scip/buildflags.c",
        ],
        exclude =
            [
                #"src/scip/prop_symmetry.h",
            ],
    ),
    copts = [
        "$(STACK_FRAME_UNLIMITED)",  # src/scip/reader_cnf.c
        "-DSCIP_WITH_ZLIB",
        "-DWITH_SCIPDEF",
        "-DSCIP_ROUNDING_FE",
        "-DTPI_TNYC",  # src/tpi/type_tpi_tnycthrd.h
        # Compile in thead-safe mode (required since we use TPI_TNYC). Note,
        # one does not technically need to add this, as SCIP code always
        # uses syntax like "#ifndef NPARASCIP". But let's be explicit here.
        "-DPARASCIP",
        "-Isrc",
        "-Isrc/scip",
    ] + PLATFORM_FLAGS,
    defines = [
        # Scip v800 optionally depends on scip/config.h and
        # scip/scip_export.h that are generated by build system.
        #
        # We need every library and binary that depends on SCIP libraries to
        # define this macro. That is why we use `defines' here instead of
        # `copts' or `local_defines'.
        "NO_CONFIG_HEADER",
    ],
    features = ["-parse_headers"],
    includes = [
        "src",
    ],
    visibility = ["//visibility:public"],
    deps = [
        #"@cppad:cppad_includes",
        "@zlib",
    ] + PLATFORM_DEPS,
)