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 import("//testing/test.gni")
7 # The list of files is kept in the .gypi.
8 gypi_values = exec_script("//build/gypi_to_gn.py",
9 [ rebase_path("wtf.gypi") ],
13 visibility = [ "//third_party/WebKit/*" ]
15 config("wtf_config") {
19 "_CRT_SECURE_NO_DEPRECATE",
20 "_SCL_SECURE_NO_DEPRECATE",
27 # Don't complain about calling specific versions of templatized
28 # functions (e.g. in RefPtrHashMap.h).
30 # dtoa, icu, etc. like doing assignment within conditional.
34 if (is_component_build) {
35 # Chromium windows multi-dll build enables C++ exceptions and this causes
36 # wtf to generate 4291 warning due to operator new/delete
37 # implementations. Disable the warning for chromium windows multi-dll
39 cflags += [ "/wd4291" ]
45 sources = gypi_values.wtf_files
48 "//third_party/WebKit/Source:config",
49 "//third_party/WebKit/Source:non_test_config",
52 defines = [ "WTF_IMPLEMENTATION=1" ]
56 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
57 "//build/config/compiler:no_size_t_to_int_warning",
58 "//third_party/WebKit/Source:features",
67 "ThreadingPthreads.cpp",
71 "/wd4068", # Unknown pragma.
76 "ThreadSpecificWin.cpp",
89 libs = [ "CoreFoundation.framework", "Foundation.framework" ]
92 "text/StringImplCF.cpp",
93 "text/AtomicStringCF.cpp",
99 test("wtf_unittests") {
100 visibility = [] # Allow re-assignment of list.
103 sources = gypi_values.wtf_unittest_files
105 sources += [ "testing/RunAllTests.cpp" ]
107 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
108 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
111 cflags = [ "/wd4068" ] # Unknown pragma.
114 configs += [ "//third_party/WebKit/Source:config", ]
121 "//base/test:test_support",
127 component("test_support") {
128 output_name = "wtf_test_support"
129 sources = gypi_values.wtf_unittest_helper_files
130 defines = [ "WTF_UNITTEST_HELPERS_IMPLEMENTATION=1" ]
134 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
135 "//build/config/compiler:no_size_t_to_int_warning",
136 "//third_party/WebKit/Source:config",
137 "//third_party/WebKit/Source:non_test_config",