Files
cpp-project-template/third_party/prometheus/bazel/civetweb.BUILD
tqcq c68893bace
Some checks failed
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Failing after 29s
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Failing after 16s
sm-rpc / build (Debug, host.gcc) (push) Failing after 11s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Failing after 12s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Failing after 11s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Failing after 11s
sm-rpc / build (Release, host.gcc) (push) Failing after 12s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Failing after 16s
feat add spdlog
2025-08-22 18:22:57 +08:00

106 lines
1.9 KiB
Plaintext

licenses(["notice"]) # MIT license
config_setting(
name = "osx",
constraint_values = [
"@platforms//os:osx",
],
)
config_setting(
name = "windows",
constraint_values = [
"@platforms//os:windows",
],
)
config_setting(
name = "with_ssl",
define_values = {
"with_civetweb_ssl": "true",
},
visibility = ["//visibility:public"],
)
COPTS = [
"-DUSE_IPV6",
"-DNDEBUG",
"-DNO_CGI",
"-DNO_CACHING",
"-DNO_FILES",
"-UDEBUG",
] + select({
":with_ssl": [
"-DOPENSSL_API_1_1",
"-DNO_SSL_DL",
],
"//conditions:default": [
"-DNO_SSL",
],
})
DEPS = select({
":with_ssl": [
"@boringssl//:crypto",
"@boringssl//:ssl",
],
"//conditions:default": [],
})
cc_library(
name = "civetweb",
srcs = [
"src/civetweb.c",
],
hdrs = [
"include/civetweb.h",
],
copts = COPTS,
includes = [
"include",
],
linkopts = select({
":windows": [],
"//conditions:default": ["-lpthread"],
}) + select({
":osx": [],
":windows": [],
"//conditions:default": ["-lrt"],
}),
textual_hdrs = [
"src/handle_form.inl",
"src/match.inl",
"src/md5.inl",
"src/response.inl",
"src/sort.inl",
],
visibility = ["//visibility:public"],
deps = DEPS,
)
cc_library(
name = "civetserver",
srcs = [
"src/CivetServer.cpp",
],
hdrs = [
"include/CivetServer.h",
],
copts = COPTS,
includes = [
"include",
],
linkopts = select({
":windows": [],
"//conditions:default": ["-lpthread"],
}) + select({
":osx": [],
":windows": [],
"//conditions:default": ["-lrt"],
}),
visibility = ["//visibility:public"],
deps = [
":civetweb",
],
)