Chromium Code Reviews| Index: third_party/opus/BUILD.gn |
| diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn |
| index 8f51d09ffd4bd6f8808bf4054fbcb919465b4795..5a73af7fcda59f720e0efc6d9f881e2356350474 100644 |
| --- a/third_party/opus/BUILD.gn |
| +++ b/third_party/opus/BUILD.gn |
| @@ -26,6 +26,23 @@ config("opus_config") { |
| include_dirs = [ "src/include" ] |
| } |
| +config("opus_test_config") { |
| + include_dirs = [ |
| + "src/celt", |
| + "src/silk", |
| + ] |
| + |
| + if (is_win) { |
| + defines = [ "inline=__inline" ] |
| + } |
| + if (is_android) { |
| + libs = [ "log" ] |
| + } |
| + if (is_clang) { |
| + cflags = [ "-Wno-absolute-value" ] |
| + } |
| +} |
| + |
| if (use_opus_rtcd) { |
| action("convert_rtcd_assembler") { |
| script = "convert_rtcd_assembler.py" |
| @@ -173,23 +190,11 @@ executable("opus_compare") { |
| ] |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| - configs += [ "//build/config/compiler:no_chromium_code" ] |
| - |
| - include_dirs = [ |
| - "src/celt", |
| - "src/silk", |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| ] |
| - if (is_win) { |
| - defines = [ "inline=__inline" ] |
| - } |
| - if (is_android) { |
| - libs = [ "log" ] |
| - } |
| - if (is_clang) { |
| - cflags = [ "-Wno-absolute-value" ] |
| - } |
| - |
| deps = [ |
| ":opus", |
| ] |
| @@ -201,22 +206,74 @@ executable("opus_demo") { |
| ] |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| - configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| + ] |
| - include_dirs = [ |
| - "src/celt", |
| - "src/silk", |
| + deps = [ |
| + ":opus", |
| ] |
| +} |
| - if (is_win) { |
| - defines = [ "inline=__inline" ] |
| - } |
| - if (is_android) { |
| - libs = [ "log" ] |
| - } |
| - if (is_clang) { |
| - cflags = [ "-Wno-absolute-value" ] |
| - } |
| +executable("test_opus_api") { |
|
brettw
2015/01/29 20:25:30
Can you do "test" instead of "executable"? You wil
wtc
2015/01/29 21:11:33
Done. I have two questions.
1. I didn't make this
brettw
2015/01/30 19:02:30
Right.
|
| + sources = [ |
| + "src/tests/test_opus_api.c", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| + ] |
| + |
| + deps = [ |
| + ":opus", |
| + ] |
| +} |
| + |
| +executable("test_opus_encode") { |
| + sources = [ |
| + "src/tests/test_opus_encode.c", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| + ] |
| + |
| + deps = [ |
| + ":opus", |
| + ] |
| +} |
| + |
| +executable("test_opus_decode") { |
| + sources = [ |
| + "src/tests/test_opus_decode.c", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| + ] |
| + |
| + deps = [ |
| + ":opus", |
| + ] |
| +} |
| + |
| +executable("test_opus_padding") { |
| + sources = [ |
| + "src/tests/test_opus_padding.c", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":opus_test_config", |
| + ] |
| deps = [ |
| ":opus", |