|
| 1 | +load("@rules_cc//cc:defs.bzl", "cc_library") |
| 2 | + |
| 3 | +package(default_visibility = ["//visibility:public"]) |
| 4 | + |
| 5 | +constraint_setting(name = "fastfloat", default_constraint_value = ":without_fastfloat") |
| 6 | +constraint_value(name = "with_fastfloat", constraint_setting = ":fastfloat") |
| 7 | +constraint_value(name = "without_fastfloat", constraint_setting = ":fastfloat") |
| 8 | + |
| 9 | +cc_library( |
| 10 | + name = "c4core", |
| 11 | + defines = select({ |
| 12 | + ":without_fastfloat": ["C4CORE_NO_FAST_FLOAT"], |
| 13 | + ":with_fastfloat": [], |
| 14 | + }), |
| 15 | + includes = ["src"], |
| 16 | + srcs = [ |
| 17 | + "src/c4/allocator.hpp", |
| 18 | + "src/c4/base64.hpp", |
| 19 | + "src/c4/base64.cpp", |
| 20 | + "src/c4/blob.hpp", |
| 21 | + "src/c4/bitmask.hpp", |
| 22 | + "src/c4/charconv.hpp", |
| 23 | + "src/c4/c4_pop.hpp", |
| 24 | + "src/c4/c4_push.hpp", |
| 25 | + "src/c4/char_traits.cpp", |
| 26 | + "src/c4/char_traits.hpp", |
| 27 | + "src/c4/common.hpp", |
| 28 | + "src/c4/compiler.hpp", |
| 29 | + "src/c4/config.hpp", |
| 30 | + "src/c4/cpu.hpp", |
| 31 | + "src/c4/ctor_dtor.hpp", |
| 32 | + "src/c4/dump.hpp", |
| 33 | + "src/c4/enum.hpp", |
| 34 | + "src/c4/error.cpp", |
| 35 | + "src/c4/error.hpp", |
| 36 | + "src/c4/export.hpp", |
| 37 | + "src/c4/format.hpp", |
| 38 | + "src/c4/format.cpp", |
| 39 | + "src/c4/hash.hpp", |
| 40 | + "src/c4/language.hpp", |
| 41 | + "src/c4/language.cpp", |
| 42 | + "src/c4/memory_resource.cpp", |
| 43 | + "src/c4/memory_resource.hpp", |
| 44 | + "src/c4/memory_util.cpp", |
| 45 | + "src/c4/memory_util.hpp", |
| 46 | + "src/c4/platform.hpp", |
| 47 | + "src/c4/preprocessor.hpp", |
| 48 | + "src/c4/restrict.hpp", |
| 49 | + "src/c4/span.hpp", |
| 50 | + "src/c4/std/std.hpp", |
| 51 | + "src/c4/std/std_fwd.hpp", |
| 52 | + "src/c4/std/string.hpp", |
| 53 | + "src/c4/std/string_fwd.hpp", |
| 54 | + "src/c4/std/tuple.hpp", |
| 55 | + "src/c4/std/vector.hpp", |
| 56 | + "src/c4/std/vector_fwd.hpp", |
| 57 | + "src/c4/substr.hpp", |
| 58 | + "src/c4/substr_fwd.hpp", |
| 59 | + "src/c4/szconv.hpp", |
| 60 | + "src/c4/type_name.hpp", |
| 61 | + "src/c4/types.hpp", |
| 62 | + "src/c4/unrestrict.hpp", |
| 63 | + "src/c4/utf.hpp", |
| 64 | + "src/c4/utf.cpp", |
| 65 | + "src/c4/windows.hpp", |
| 66 | + "src/c4/windows_pop.hpp", |
| 67 | + "src/c4/windows_push.hpp", |
| 68 | + # |
| 69 | + "src/c4/ext/debugbreak/debugbreak.h", |
| 70 | + "src/c4/ext/rng/rng.hpp", |
| 71 | + "src/c4/ext/sg14/inplace_function.h", |
| 72 | + ] + select({ |
| 73 | + ":without_fastfloat": [], |
| 74 | + ":with_fastfloat": [ |
| 75 | + "src/c4/ext/fast_float.hpp", |
| 76 | + "src/c4/ext/fast_float_all.h", |
| 77 | + ], |
| 78 | + }), |
| 79 | +) |
0 commit comments