-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
82 lines (74 loc) · 2.05 KB
/
BUILD.bazel
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
""" Builds qpoases_embedded.
"""
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
bool_flag(
name = "debug",
build_setting_default = False,
)
config_setting(
name = "debug_on",
flag_values = {":debug": "True"},
)
_HEADERS = [
"include/qpoases_embedded/Bounds.hpp",
"include/qpoases_embedded/Bounds.ipp",
"include/qpoases_embedded/Constants.hpp",
"include/qpoases_embedded/Constraints.hpp",
"include/qpoases_embedded/Constraints.ipp",
"include/qpoases_embedded/Indexlist.hpp",
"include/qpoases_embedded/Indexlist.ipp",
"include/qpoases_embedded/MessageHandling.hpp",
"include/qpoases_embedded/QProblem.hpp",
"include/qpoases_embedded/QProblem.ipp",
"include/qpoases_embedded/QProblemB.hpp",
"include/qpoases_embedded/QProblemB.ipp",
"include/qpoases_embedded/SubjectTo.hpp",
"include/qpoases_embedded/SubjectTo.ipp",
"include/qpoases_embedded/Types.hpp",
]
cc_binary(
name = "qpoases_embedded_shared",
srcs = [
"src/Bounds.cpp",
"src/Constraints.cpp",
"src/Indexlist.cpp",
"src/MessageHandling.cpp",
"src/QProblem.cpp",
"src/QProblemB.cpp",
"src/SubjectTo.cpp",
] + _HEADERS,
includes = ["include"],
defines = select({
":debug_on": ["QPOASES_DEBUG"],
"//conditions:default": [],
}),
copts = [
"-std=c++17",
"-Wall", "-Wextra", "-Wpedantic", "-Wfloat-equal", "-Werror",
],
linkshared = True,
)
cc_library(
name = "qpoases_embedded",
hdrs = _HEADERS,
includes = ["include"],
srcs = [":qpoases_embedded_shared"],
linkstatic = True,
visibility = ["//visibility:public"],
)
cc_library(
name = "utils",
srcs = ["src/Utils.cpp"],
hdrs = ["include/qpoases_embedded/Utils.hpp"],
includes = ["include"],
copts = [
"-std=c++17",
"-Wall", "-Wextra", "-Wpedantic", "-Wfloat-equal", "-Werror",
],
deps = [":qpoases_embedded"],
visibility = ["//visibility:public"],
)
exports_files([
"deps.bzl",
"repositories.bzl",
])