From f03f7810c30cb3d01517c0efc189d68e440c9162 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 15 Oct 2018 23:48:29 +0000 Subject: Split pdfium_unittests sources. Move foo_unittest.cpp to the same BUILD.gn file as foo.cpp. Set up dependencies to make pdfium_unittests pass gn check. Change-Id: Id9f649d5d0c76fe4254f3887778516abb75fcbce Reviewed-on: https://pdfium-review.googlesource.com/c/43995 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- testing/BUILD.gn | 1 + testing/test.gni | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'testing') diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 0dd6a82071..c231e2207f 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -10,6 +10,7 @@ jumbo_source_set("test_support") { sources = [ "fx_string_testhelpers.cpp", "fx_string_testhelpers.h", + "pseudo_retainable.h", "string_write_stream.cpp", "string_write_stream.h", "test_support.cpp", diff --git a/testing/test.gni b/testing/test.gni index b69a0706ec..0bfac4666c 100644 --- a/testing/test.gni +++ b/testing/test.gni @@ -263,3 +263,24 @@ set_defaults("test") { configs = default_executable_configs } } + +template("pdfium_unittest_source_set") { + source_set(target_name) { + _pdfium_root_dir = rebase_path(invoker.pdfium_root_dir, ".") + + testonly = true + sources = invoker.sources + configs += [ _pdfium_root_dir + ":pdfium_core_config" ] + if (defined(invoker.configs)) { + configs += invoker.configs + } + deps = [ + _pdfium_root_dir + ":pdfium_unittest_deps", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + visibility = [ _pdfium_root_dir + ":*" ] + forward_variables_from(invoker, [ "cflags" ]) + } +} -- cgit v1.2.3