aboutsummaryrefslogtreecommitdiff
path: root/util/BUILD.gn
blob: 65b16c62f56af3e63f3d6f1bee93078c8d1ef9c7 (plain)
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
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build_overrides/build.gni")

source_set("util") {
  sources = [
    "alarm.cc",
    "alarm.h",
    "big_endian.cc",
    "big_endian.h",
    "crypto/openssl_util.cc",
    "crypto/openssl_util.h",
    "crypto/rsa_private_key.cc",
    "crypto/rsa_private_key.h",
    "crypto/secure_hash.cc",
    "crypto/secure_hash.h",
    "crypto/sha2.cc",
    "crypto/sha2.h",
    "json/json_reader.cc",
    "json/json_reader.h",
    "json/json_writer.cc",
    "json/json_writer.h",
    "std_util.h",
    "stringprintf.h",
  ]

  deps = [
    "../third_party/abseil",
    "../third_party/boringssl",
    "../third_party/jsoncpp",
  ]

  configs += [ "../build:allow_build_from_embedder" ]
}

source_set("util_unittests") {
  testonly = true

  sources = [
    "alarm_unittest.cc",
    "big_endian_unittest.cc",
    "crypto/rsa_private_key_unittest.cc",
    "crypto/secure_hash_unittest.cc",
    "crypto/sha2_unittest.cc",
    "json/json_reader_unittest.cc",
    "json/json_writer_unittest.cc",
  ]

  deps = [
    ":util",
    "../third_party/abseil",
    "../third_party/boringssl",
    "../third_party/googletest:gmock",
    "../third_party/googletest:gtest",
    "../third_party/jsoncpp",
  ]

  configs += [ "../build:allow_build_from_embedder" ]
}