Index: third_party/xmllite/BUILD.gn |
diff --git a/third_party/xmllite/BUILD.gn b/third_party/xmllite/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03a8bb3306ef9db903e4a3ab60b150f3234b92c8 |
--- /dev/null |
+++ b/third_party/xmllite/BUILD.gn |
@@ -0,0 +1,86 @@ |
+# Copyright 2016 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("../webrtc/build/webrtc.gni") |
+ |
+group("xmllite") { |
+ public_deps = [ |
+ ":rtc_xmllite", |
+ ] |
+} |
+ |
+rtc_static_library("rtc_xmllite") { |
+ sources = [ |
+ "qname.cc", |
+ "qname.h", |
+ "xmlbuilder.cc", |
+ "xmlbuilder.h", |
+ "xmlconstants.cc", |
+ "xmlconstants.h", |
+ "xmlelement.cc", |
+ "xmlelement.h", |
+ "xmlnsstack.cc", |
+ "xmlnsstack.h", |
+ "xmlparser.cc", |
+ "xmlparser.h", |
+ "xmlprinter.cc", |
+ "xmlprinter.h", |
+ ] |
+ |
+ deps = [ |
+ "//third_party/webrtc/base:rtc_base", |
+ ] |
+ |
+ if (rtc_build_expat) { |
+ deps += [ "//third_party/expat" ] |
+ public_deps = [ |
+ "//third_party/expat", |
+ ] |
+ } |
+ |
+ if (!build_with_chromium && is_clang) { |
+ # Suppress warnings from Chrome's Clang plugins. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+} |
+ |
+if (rtc_include_tests) { |
+ config("xmllite_unittests_config") { |
+ # GN orders flags on a target before flags from configs. The default config |
+ # adds -Wall, and this flag have to be after -Wall -- so they need to |
+ # come from a config and can"t be on the target directly. |
+ if (is_clang) { |
+ cflags = [ |
+ "-Wno-missing-braces", |
+ "-Wno-sign-compare", |
+ "-Wno-unused-const-variable", |
+ ] |
+ } |
+ } |
+ |
+ rtc_test("xmllite_unittests") { |
+ configs += [ ":xmplite_unittests_config" ] |
+ |
+ if (!build_with_chromium && is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ |
+ deps = [ |
+ ":rtc_xmllite", |
+ "//testing/gtest", |
+ "//third_party/webrtc/base:rtc_base_tests_utils", |
+ ] |
+ |
+ sources = [ |
+ "qname_unittest.cc", |
+ "xmlbuilder_unittest.cc", |
+ "xmlelement_unittest.cc", |
+ "xmlnsstack_unittest.cc", |
+ "xmlparser_unittest.cc", |
+ "xmlprinter_unittest.cc", |
+ ] |
+ } |
+} |