Revert of Re-enable ScreenOrientationListenerTest.java and run locking on UI thread...
[chromium-blink-merge.git] / rlz / BUILD.gn
bloba7e399125b16e018286a1f851d013d24ad82e678
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Note that this build file assumes rlz_use_chrome_net which is a condition in
6 # the GYP file, but is always true for Chrome builds.
8 config("rlz_config") {
9   defines = [ "RLZ_NETWORK_IMPLEMENTATION_CHROME_NET" ]
12 source_set("rlz_lib") {
13   sources = [
14     "chromeos/lib/machine_id_chromeos.cc",
15     "chromeos/lib/rlz_value_store_chromeos.cc",
16     "chromeos/lib/rlz_value_store_chromeos.h",
17     "ios/lib/machine_id_ios.cc",
18     "lib/assert.cc",
19     "lib/assert.h",
20     "lib/crc32.h",
21     "lib/crc32_wrapper.cc",
22     "lib/crc8.h",
23     "lib/crc8.cc",
24     "lib/financial_ping.cc",
25     "lib/financial_ping.h",
26     "lib/lib_values.cc",
27     "lib/machine_id.cc",
28     "lib/machine_id.h",
29     "lib/recursive_cross_process_lock_posix.cc",
30     "lib/recursive_cross_process_lock_posix.h",
31     "lib/rlz_enums.h",
32     "lib/rlz_lib.cc",
33     "lib/rlz_lib.h",
34     "lib/rlz_lib_clear.cc",
35     "lib/lib_values.h",
36     "lib/rlz_value_store.h",
37     "lib/string_utils.cc",
38     "lib/string_utils.h",
39     "mac/lib/machine_id_mac.cc",
40     "mac/lib/rlz_value_store_mac.mm",
41     "mac/lib/rlz_value_store_mac.h",
42     "win/lib/lib_mutex.cc",
43     "win/lib/lib_mutex.h",
44     "win/lib/machine_deal.cc",
45     "win/lib/machine_deal.h",
46     "win/lib/machine_id_win.cc",
47     "win/lib/process_info.cc",
48     "win/lib/process_info.h",
49     "win/lib/registry_util.cc",
50     "win/lib/registry_util.h",
51     "win/lib/rlz_lib_win.cc",
52     "win/lib/rlz_value_store_registry.cc",
53     "win/lib/rlz_value_store_registry.h",
54   ]
56   direct_dependent_configs = [ ":rlz_config" ]
58   deps = [
59     "//base",
60     "//base/third_party/dynamic_annotations",
61     "//net",
62   ]
64   if (is_ios) {
65     # These _mac files are also used on iOS.
66     set_sources_assignment_filter([])
67     sources += [
68       "mac/lib/rlz_value_store_mac.mm",
69       "mac/lib/rlz_value_store_mac.h",
70     ]
71     set_sources_assignment_filter(sources_assignment_filter)
72   } else if (is_win) {
73     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
74     cflags = [ "/wd4267" ]
75   }
78 source_set("test_support") {
79   sources = [
80     "test/rlz_test_helpers.cc",
81     "test/rlz_test_helpers.h",
82   ]
83   deps = [
84     ":rlz_lib",
85     "//base",
86     "//base/test:test_support",
87     "//testing/gtest",
88   ]
91 test("rlz_unittests") {
92   sources = [
93     "lib/crc32_unittest.cc",
94     "lib/crc8_unittest.cc",
95     "lib/financial_ping_test.cc",
96     "lib/lib_values_unittest.cc",
97     "lib/machine_id_unittest.cc",
98     "lib/rlz_lib_test.cc",
99     "lib/string_utils_unittest.cc",
100     "test/rlz_unittest_main.cc",
101     "win/lib/machine_deal_test.cc",
102   ]
104   deps = [
105     ":rlz_lib",
106     ":test_support",
107     "//base",
108     "//base:prefs",
109     "//net:test_support",
110     "//testing/gmock",
111     "//testing/gtest",
112     "//third_party/zlib",
113   ]
116 executable("rlz_id") {
117   sources = [
118     "examples/rlz_id.cc",
119   ]
120   deps = [
121     ":rlz_lib",
122   ]
125 if (is_win) {
126   shared_library("rlz") {
127     sources = [
128       "win/dll/dll_main.cc",
129       "win/dll/exports.cc",
130     ]
131     deps = [
132       ":rlz_lib",
133       "//third_party/zlib",
134     ]
135   }