summaryrefslogtreecommitdiffstats
path: root/components/translate/core/language_detection/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'components/translate/core/language_detection/BUILD.gn')
-rw-r--r--components/translate/core/language_detection/BUILD.gn20
1 files changed, 16 insertions, 4 deletions
diff --git a/components/translate/core/language_detection/BUILD.gn b/components/translate/core/language_detection/BUILD.gn
index 57e1d10..a1d15ef 100644
--- a/components/translate/core/language_detection/BUILD.gn
+++ b/components/translate/core/language_detection/BUILD.gn
@@ -4,7 +4,7 @@
import("//build/config/features.gni")
-static_library("language_detection") {
+source_set("language_detection") {
sources = [
"language_detection_util.cc",
"language_detection_util.h",
@@ -18,8 +18,20 @@ static_library("language_detection") {
if (cld_version == 1) {
deps += [ "//third_party/cld" ]
+ } else if (cld_version == 2) {
+ deps += [ "//third_party/cld_2:cld2_platform_impl" ]
+ } else {
+ assert(false, "Need a CLD version")
}
- if (cld_version == 2) {
- deps += [ "//third_party/cld_2" ]
- }
+}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "language_detection_util_unittest.cc",
+ ]
+ deps = [
+ ":language_detection",
+ "//testing/gtest",
+ ]
}