forked from wolfpld/tracy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
117 lines (107 loc) · 5.03 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
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
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:copts.bzl", "cxxopts")
# NOTE: the defaults for these settings are intended to match the defaults in CMakeLists.txt
bool_flag(name = "enable", build_setting_default = True, visibility = ["//visibility:public"])
config_setting(name = "_enable", flag_values = {":enable": "True"})
bool_flag(name = "broadcast", build_setting_default = True, visibility = ["//visibility:public"])
config_setting(name = "_broadcast", flag_values = {":broadcast": "True"})
bool_flag(name = "on_demand", build_setting_default = False, visibility = ["//visibility:public"])
config_setting(name = "_on_demand", flag_values = {":on_demand": "True"})
bool_flag(name = "fibers", build_setting_default = False, visibility = ["//visibility:public"])
config_setting(name = "_fibers", flag_values = {":fibers": "True"})
bool_flag(name = "manual_lifetime", build_setting_default = False, visibility = ["//visibility:public"])
config_setting(name = "_manual_lifetime", flag_values = {":manual_lifetime": "True"})
bool_flag(name = "delayed_init", build_setting_default = False, visibility = ["//visibility:public"])
config_setting(name = "_delayed_init", flag_values = {":delayed_init": "True"})
bool_flag(name = "tracy_imports", build_setting_default = False, visibility = ["//visibility:public"])
config_setting(name = "_tracy_imports", flag_values = {":tracy_imports": "True"})
cc_library(
name = "TracyClient",
strip_include_prefix = "public",
visibility = ["//visibility:public"],
cxxopts = select({
"@rules_cc//cc/compiler:msvc-cl": ["/std:c++20"],
"//conditions:default": ["-std=c++20"],
}),
defines =
select({":_enable": ["TRACY_ENABLE"], "//conditions:default": []}) +
select({":_broadcast": [], "//conditions:default": ["TRACY_NO_BROADCAST"]}) +
select({":_on_demand": ["TRACY_ON_DEMAND"], "//conditions:default": []}) +
select({":_fibers": ["TRACY_FIBERS"], "//conditions:default": []}) +
select({":_manual_lifetime": ["TRACY_MANUAL_LIFETIME"], "//conditions:default": []}) +
select({":_delayed_init": ["TRACY_DELAYED_INIT"], "//conditions:default": []}) +
select({":_tracy_imports": ["TRACY_IMPORTS"], "//conditions:default": []}),
includes = ["public"],
hdrs = glob(["public/**/*"]),
srcs = select({
":_tracy_imports": [],
"//conditions:default": ["public/TracyClient.cpp"],
}),
)
alias(name = "tracy", actual = ":TracyClient", visibility = ["//visibility:public"])
filegroup(
name = "tracy_srcs",
visibility = ["//visibility:public"],
srcs = [
"public/TracyClient.cpp",
"public/tracy/TracyC.h",
"public/tracy/Tracy.hpp",
"public/tracy/TracyD3D11.hpp",
"public/tracy/TracyD3D12.hpp",
"public/tracy/TracyLua.hpp",
"public/tracy/TracyOpenCL.hpp",
"public/tracy/TracyOpenGL.hpp",
"public/tracy/TracyVulkan.hpp",
"public/common/TracyColor.hpp",
"public/common/TracyAlign.hpp",
"public/common/TracyAlloc.hpp",
"public/common/TracyApi.h",
"public/common/TracyForceInline.hpp",
"public/common/TracyMutex.hpp",
"public/common/TracyProtocol.hpp",
"public/common/TracyQueue.hpp",
"public/common/TracySocket.hpp",
"public/common/TracyStackFrames.hpp",
"public/common/TracySystem.hpp",
"public/common/TracyUwp.hpp",
"public/common/TracyVersion.hpp",
"public/common/TracyYield.hpp",
"public/common/tracy_lz4.hpp",
"public/common/tracy_lz4hc.hpp",
"public/common/TracySystem.cpp",
"public/common/tracy_lz4.cpp",
"public/common/TracySocket.cpp",
"public/client/TracyArmCpuTable.hpp",
"public/client/TracyCallstack.h",
"public/client/TracyCallstack.hpp",
"public/client/TracyCpuid.hpp",
"public/client/TracyDebug.hpp",
"public/client/TracyDxt1.hpp",
"public/client/TracyFastVector.hpp",
"public/client/TracyKCore.hpp",
"public/client/TracyLock.hpp",
"public/client/TracyProfiler.hpp",
"public/client/TracyRingBuffer.hpp",
"public/client/TracyScoped.hpp",
"public/client/TracyStringHelpers.hpp",
"public/client/TracySysPower.hpp",
"public/client/TracySysTime.hpp",
"public/client/TracySysTrace.hpp",
"public/client/TracyThread.hpp",
"public/client/tracy_SPSCQueue.h",
"public/client/tracy_concurrentqueue.h",
"public/client/tracy_rpmalloc.hpp",
"public/client/TracyAlloc.cpp",
"public/client/TracyCallstack.cpp",
"public/client/TracyDxt1.cpp",
"public/client/TracyKCore.cpp",
"public/client/TracyOverride.cpp",
"public/client/TracyProfiler.cpp",
"public/client/TracySysPower.cpp",
"public/client/TracySysTime.cpp",
"public/client/TracySysTrace.cpp",
"public/client/tracy_rpmalloc.cpp",
],
)