xref: /aosp_15_r20/external/cronet/base/numerics/BUILD.gn (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2024 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# This is a dependency-free, header-only, library, and it needs to stay that
6# way to facilitate pulling it into various third-party projects. So, this
7# file is here to protect against accidentally introducing external
8# dependencies or depending on internal implementation details.
9source_set("base_numerics") {
10  visibility = [ "//base/*" ]
11  sources = [
12    "basic_ops_impl.h",
13    "checked_math_impl.h",
14    "clamped_math_impl.h",
15    "safe_conversions_arm_impl.h",
16    "safe_conversions_impl.h",
17    "safe_math_arm_impl.h",
18    "safe_math_clang_gcc_impl.h",
19    "safe_math_shared_impl.h",
20  ]
21  public = [
22    "angle_conversions.h",
23    "byte_conversions.h",
24    "checked_math.h",
25    "clamped_math.h",
26    "math_constants.h",
27    "ostream_operators.h",
28    "ranges.h",
29    "safe_conversions.h",
30    "safe_math.h",
31    "wrapping_math.h",
32  ]
33}
34
35source_set("unittests") {
36  testonly = true
37  visibility = [ "//base/*" ]
38  sources = [ "byte_conversions_unittest.cc" ]
39  deps = [
40    "//base/numerics:base_numerics",
41    "//testing/gtest",
42  ]
43}
44