| OLD | NEW |
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("//build/config/crypto.gni") | 9 import("//build/config/crypto.gni") |
| 10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ] | 85 ] |
| 86 if (rtc_enable_protobuf) { | 86 if (rtc_enable_protobuf) { |
| 87 public_deps = [ | 87 public_deps = [ |
| 88 "//third_party/protobuf:protobuf_lite", | 88 "//third_party/protobuf:protobuf_lite", |
| 89 ] | 89 ] |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 # The subset of rtc_base approved for use outside of libjingle. | 93 # The subset of rtc_base approved for use outside of libjingle. |
| 94 rtc_static_library("rtc_base_approved") { | 94 rtc_static_library("rtc_base_approved") { |
| 95 # TODO(kjellander): Remove (bugs.webrtc.org/7480) | |
| 96 # Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc: | |
| 97 # :rtc_base_approved -> //webrtc/system_wrappers -> :rtc_base_approved | |
| 98 check_includes = false | |
| 99 defines = [] | 95 defines = [] |
| 100 libs = [] | 96 libs = [] |
| 101 deps = [] | 97 deps = [] |
| 102 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] | 98 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] |
| 103 | 99 |
| 104 sources = [ | 100 sources = [ |
| 105 "array_view.h", | 101 "array_view.h", |
| 106 "arraysize.h", | 102 "arraysize.h", |
| 107 "atomicops.h", | 103 "atomicops.h", |
| 108 "base64.cc", | 104 "base64.cc", |
| (...skipping 24 matching lines...) Expand all Loading... |
| 133 "file.h", | 129 "file.h", |
| 134 "flags.cc", | 130 "flags.cc", |
| 135 "flags.h", | 131 "flags.h", |
| 136 "format_macros.h", | 132 "format_macros.h", |
| 137 "function_view.h", | 133 "function_view.h", |
| 138 "ignore_wundef.h", | 134 "ignore_wundef.h", |
| 139 "location.cc", | 135 "location.cc", |
| 140 "location.h", | 136 "location.h", |
| 141 "md5.cc", | 137 "md5.cc", |
| 142 "md5.h", | 138 "md5.h", |
| 139 "md5digest.cc", |
| 140 "md5digest.h", |
| 143 "mod_ops.h", | 141 "mod_ops.h", |
| 144 "onetimeevent.h", | 142 "onetimeevent.h", |
| 145 "optional.cc", | 143 "optional.cc", |
| 146 "optional.h", | 144 "optional.h", |
| 147 "pathutils.cc", | 145 "pathutils.cc", |
| 148 "pathutils.h", | 146 "pathutils.h", |
| 149 "platform_file.cc", | 147 "platform_file.cc", |
| 150 "platform_file.h", | 148 "platform_file.h", |
| 151 "platform_thread.cc", | 149 "platform_thread.cc", |
| 152 "platform_thread.h", | 150 "platform_thread.h", |
| (...skipping 13 matching lines...) Expand all Loading... |
| 166 "refcountedobject.h", | 164 "refcountedobject.h", |
| 167 "safe_compare.h", | 165 "safe_compare.h", |
| 168 "safe_conversions.h", | 166 "safe_conversions.h", |
| 169 "safe_conversions_impl.h", | 167 "safe_conversions_impl.h", |
| 170 "sanitizer.h", | 168 "sanitizer.h", |
| 171 "scoped_ref_ptr.h", | 169 "scoped_ref_ptr.h", |
| 172 "string_to_number.cc", | 170 "string_to_number.cc", |
| 173 "string_to_number.h", | 171 "string_to_number.h", |
| 174 "stringencode.cc", | 172 "stringencode.cc", |
| 175 "stringencode.h", | 173 "stringencode.h", |
| 176 "stringize_macros.h", | |
| 177 "stringutils.cc", | 174 "stringutils.cc", |
| 178 "stringutils.h", | 175 "stringutils.h", |
| 179 "swap_queue.h", | 176 "swap_queue.h", |
| 180 "template_util.h", | 177 "template_util.h", |
| 181 "thread_annotations.h", | 178 "thread_annotations.h", |
| 182 "thread_checker.h", | 179 "thread_checker.h", |
| 183 "thread_checker_impl.cc", | 180 "thread_checker_impl.cc", |
| 184 "thread_checker_impl.h", | 181 "thread_checker_impl.h", |
| 185 "timestampaligner.cc", | 182 "timestampaligner.cc", |
| 186 "timestampaligner.h", | 183 "timestampaligner.h", |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 647 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 651 } | 648 } |
| 652 } | 649 } |
| 653 | 650 |
| 654 rtc_source_set("gtest_prod") { | 651 rtc_source_set("gtest_prod") { |
| 655 sources = [ | 652 sources = [ |
| 656 "gtest_prod_util.h", | 653 "gtest_prod_util.h", |
| 657 ] | 654 ] |
| 658 } | 655 } |
| 659 | 656 |
| 660 config("rtc_base_tests_utils_exported_config") { | 657 if (rtc_include_tests) { |
| 661 defines = [ "GTEST_RELATIVE_PATH" ] | 658 config("rtc_base_tests_utils_exported_config") { |
| 662 } | 659 defines = [ "GTEST_RELATIVE_PATH" ] |
| 660 } |
| 663 | 661 |
| 664 config("rtc_base_tests_utils_warnings_config") { | 662 config("rtc_base_tests_utils_warnings_config") { |
| 665 if (is_win && is_clang) { | 663 if (is_win && is_clang) { |
| 666 cflags = [ | 664 cflags = [ |
| 667 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270 | 665 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270 |
| 668 "-Wno-reorder", | 666 "-Wno-reorder", |
| 669 "-Wno-sign-compare", | 667 "-Wno-sign-compare", |
| 670 ] | 668 ] |
| 669 } |
| 671 } | 670 } |
| 672 } | |
| 673 | 671 |
| 674 rtc_source_set("rtc_base_tests_utils") { | |
| 675 testonly = true | |
| 676 sources = [ | |
| 677 # Also use this as a convenient dumping ground for misc files that are | |
| 678 # included by multiple targets below. | |
| 679 "cpu_time.cc", | |
| 680 "cpu_time.h", | |
| 681 "fakeclock.cc", | |
| 682 "fakeclock.h", | |
| 683 "fakenetwork.h", | |
| 684 "fakesslidentity.h", | |
| 685 "firewallsocketserver.cc", | |
| 686 "firewallsocketserver.h", | |
| 687 "gunit.h", | |
| 688 "httpserver.cc", | |
| 689 "httpserver.h", | |
| 690 "md5digest.cc", | |
| 691 "md5digest.h", | |
| 692 "memory_usage.cc", | |
| 693 "memory_usage.h", | |
| 694 "natserver.cc", | |
| 695 "natserver.h", | |
| 696 "natsocketfactory.cc", | |
| 697 "natsocketfactory.h", | |
| 698 "nattypes.cc", | |
| 699 "nattypes.h", | |
| 700 "proxyserver.cc", | |
| 701 "proxyserver.h", | |
| 702 "sigslottester.h", | |
| 703 "sigslottester.h.pump", | |
| 704 "testbase64.h", | |
| 705 "testechoserver.h", | |
| 706 "testutils.h", | |
| 707 "timedelta.h", | |
| 708 ] | |
| 709 configs += [ ":rtc_base_tests_utils_warnings_config" ] | |
| 710 public_configs = [ ":rtc_base_tests_utils_exported_config" ] | |
| 711 deps = [ | |
| 712 ":rtc_base", | |
| 713 "../test:field_trial", | |
| 714 "../test:test_support", | |
| 715 ] | |
| 716 public_deps = [ | |
| 717 "//testing/gmock", | |
| 718 "//testing/gtest", | |
| 719 ] | |
| 720 | |
| 721 if (!build_with_chromium && is_clang) { | |
| 722 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 723 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 724 } | |
| 725 } | |
| 726 | |
| 727 if (rtc_include_tests) { | |
| 728 rtc_source_set("rtc_base_tests_main") { | 672 rtc_source_set("rtc_base_tests_main") { |
| 729 testonly = true | 673 testonly = true |
| 730 sources = [ | 674 sources = [ |
| 731 "unittest_main.cc", | 675 "unittest_main.cc", |
| 732 ] | 676 ] |
| 733 public_configs = [ ":rtc_base_tests_utils_exported_config" ] | 677 public_configs = [ ":rtc_base_tests_utils_exported_config" ] |
| 734 deps = [ | 678 deps = [ |
| 679 ":rtc_base_tests_utils", |
| 680 ] |
| 681 public_deps = [ |
| 682 "//testing/gmock", |
| 683 "//testing/gtest", |
| 684 ] |
| 685 |
| 686 if (!build_with_chromium && is_clang) { |
| 687 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 688 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 689 } |
| 690 } |
| 691 |
| 692 rtc_source_set("rtc_base_tests_utils") { |
| 693 testonly = true |
| 694 sources = [ |
| 695 # Also use this as a convenient dumping ground for misc files that are |
| 696 # included by multiple targets below. |
| 697 "cpu_time.cc", |
| 698 "cpu_time.h", |
| 699 "fakeclock.cc", |
| 700 "fakeclock.h", |
| 701 "fakenetwork.h", |
| 702 "fakesslidentity.h", |
| 703 "firewallsocketserver.cc", |
| 704 "firewallsocketserver.h", |
| 705 "gunit.h", |
| 706 "httpserver.cc", |
| 707 "httpserver.h", |
| 708 "memory_usage.cc", |
| 709 "memory_usage.h", |
| 710 "natserver.cc", |
| 711 "natserver.h", |
| 712 "natsocketfactory.cc", |
| 713 "natsocketfactory.h", |
| 714 "nattypes.cc", |
| 715 "nattypes.h", |
| 716 "proxyserver.cc", |
| 717 "proxyserver.h", |
| 718 "sigslottester.h", |
| 719 "sigslottester.h.pump", |
| 720 "testbase64.h", |
| 721 "testechoserver.h", |
| 722 "testutils.h", |
| 723 "timedelta.h", |
| 724 ] |
| 725 configs += [ ":rtc_base_tests_utils_warnings_config" ] |
| 726 public_configs = [ ":rtc_base_tests_utils_exported_config" ] |
| 727 deps = [ |
| 735 ":rtc_base", | 728 ":rtc_base", |
| 736 ":rtc_base_approved", | |
| 737 ":rtc_base_tests_utils", | |
| 738 "../test:field_trial", | 729 "../test:field_trial", |
| 739 "../test:test_support", | 730 "../test:test_support", |
| 740 ] | 731 ] |
| 741 public_deps = [ | 732 public_deps = [ |
| 742 "//testing/gmock", | 733 "//testing/gmock", |
| 743 "//testing/gtest", | 734 "//testing/gtest", |
| 744 ] | 735 ] |
| 745 | 736 |
| 746 if (!build_with_chromium && is_clang) { | 737 if (!build_with_chromium && is_clang) { |
| 747 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 738 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| (...skipping 16 matching lines...) Expand all Loading... |
| 764 "nullsocketserver_unittest.cc", | 755 "nullsocketserver_unittest.cc", |
| 765 "physicalsocketserver_unittest.cc", | 756 "physicalsocketserver_unittest.cc", |
| 766 "socket_unittest.cc", | 757 "socket_unittest.cc", |
| 767 "socket_unittest.h", | 758 "socket_unittest.h", |
| 768 "socketaddress_unittest.cc", | 759 "socketaddress_unittest.cc", |
| 769 "virtualsocket_unittest.cc", | 760 "virtualsocket_unittest.cc", |
| 770 ] | 761 ] |
| 771 deps = [ | 762 deps = [ |
| 772 ":rtc_base", | 763 ":rtc_base", |
| 773 ":rtc_base_tests_main", | 764 ":rtc_base_tests_main", |
| 774 ":rtc_base_tests_utils", | |
| 775 "../system_wrappers:system_wrappers", | |
| 776 "../test:test_support", | |
| 777 "//testing/gtest", | 765 "//testing/gtest", |
| 778 ] | 766 ] |
| 779 if (is_win) { | 767 if (is_win) { |
| 780 sources += [ "win32socketserver_unittest.cc" ] | 768 sources += [ "win32socketserver_unittest.cc" ] |
| 781 } | 769 } |
| 782 | 770 |
| 783 if (!build_with_chromium && is_clang) { | 771 if (!build_with_chromium && is_clang) { |
| 784 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 772 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 785 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 773 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 786 } | 774 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 "pathutils_unittest.cc", | 808 "pathutils_unittest.cc", |
| 821 "platform_thread_unittest.cc", | 809 "platform_thread_unittest.cc", |
| 822 "random_unittest.cc", | 810 "random_unittest.cc", |
| 823 "rate_limiter_unittest.cc", | 811 "rate_limiter_unittest.cc", |
| 824 "rate_statistics_unittest.cc", | 812 "rate_statistics_unittest.cc", |
| 825 "ratetracker_unittest.cc", | 813 "ratetracker_unittest.cc", |
| 826 "refcountedobject_unittest.cc", | 814 "refcountedobject_unittest.cc", |
| 827 "safe_compare_unittest.cc", | 815 "safe_compare_unittest.cc", |
| 828 "string_to_number_unittest.cc", | 816 "string_to_number_unittest.cc", |
| 829 "stringencode_unittest.cc", | 817 "stringencode_unittest.cc", |
| 830 "stringize_macros_unittest.cc", | |
| 831 "stringutils_unittest.cc", | 818 "stringutils_unittest.cc", |
| 832 "swap_queue_unittest.cc", | 819 "swap_queue_unittest.cc", |
| 833 "thread_annotations_unittest.cc", | 820 "thread_annotations_unittest.cc", |
| 834 "thread_checker_unittest.cc", | 821 "thread_checker_unittest.cc", |
| 835 "timestampaligner_unittest.cc", | 822 "timestampaligner_unittest.cc", |
| 836 "timeutils_unittest.cc", | 823 "timeutils_unittest.cc", |
| 837 ] | 824 ] |
| 838 deps = [ | 825 deps = [ |
| 839 ":rtc_base", | |
| 840 ":rtc_base_approved", | 826 ":rtc_base_approved", |
| 841 ":rtc_base_tests_main", | 827 ":rtc_base_tests_main", |
| 842 ":rtc_base_tests_utils", | |
| 843 ":rtc_task_queue", | |
| 844 "../system_wrappers:system_wrappers", | |
| 845 "../test:test_support", | |
| 846 ] | 828 ] |
| 847 if (!build_with_chromium && is_clang) { | 829 if (!build_with_chromium && is_clang) { |
| 848 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 830 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 849 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 831 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 850 } | 832 } |
| 851 } | 833 } |
| 852 | 834 |
| 853 rtc_source_set("rtc_task_queue_unittests") { | 835 rtc_source_set("rtc_task_queue_unittests") { |
| 854 testonly = true | 836 testonly = true |
| 855 | 837 |
| 856 # Skip restricting visibility on mobile platforms since the tests on those | 838 # Skip restricting visibility on mobile platforms since the tests on those |
| 857 # gets additional generated targets which would require many lines here to | 839 # gets additional generated targets which would require many lines here to |
| 858 # cover (which would be confusing to read and hard to maintain). | 840 # cover (which would be confusing to read and hard to maintain). |
| 859 if (!is_android && !is_ios) { | 841 if (!is_android && !is_ios) { |
| 860 visibility = [ "//webrtc:rtc_unittests" ] | 842 visibility = [ "//webrtc:rtc_unittests" ] |
| 861 } | 843 } |
| 862 sources = [ | 844 sources = [ |
| 863 "sequenced_task_checker_unittest.cc", | 845 "sequenced_task_checker_unittest.cc", |
| 864 "task_queue_unittest.cc", | 846 "task_queue_unittest.cc", |
| 865 "weak_ptr_unittest.cc", | 847 "weak_ptr_unittest.cc", |
| 866 ] | 848 ] |
| 867 deps = [ | 849 deps = [ |
| 868 ":rtc_base_tests_main", | 850 ":rtc_base_tests_main", |
| 869 ":rtc_base_tests_utils", | |
| 870 ":rtc_task_queue", | 851 ":rtc_task_queue", |
| 871 "../test:test_support", | |
| 872 ] | 852 ] |
| 873 if (!build_with_chromium && is_clang) { | 853 if (!build_with_chromium && is_clang) { |
| 874 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 854 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 875 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 855 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 876 } | 856 } |
| 877 } | 857 } |
| 878 | 858 |
| 879 rtc_source_set("rtc_numerics_unittests") { | 859 rtc_source_set("rtc_numerics_unittests") { |
| 880 testonly = true | 860 testonly = true |
| 881 | 861 |
| 882 # Skip restricting visibility on mobile platforms since the tests on those | 862 # Skip restricting visibility on mobile platforms since the tests on those |
| 883 # gets additional generated targets which would require many lines here to | 863 # gets additional generated targets which would require many lines here to |
| 884 # cover (which would be confusing to read and hard to maintain). | 864 # cover (which would be confusing to read and hard to maintain). |
| 885 if (!is_android && !is_ios) { | 865 if (!is_android && !is_ios) { |
| 886 visibility = [ "//webrtc:rtc_unittests" ] | 866 visibility = [ "//webrtc:rtc_unittests" ] |
| 887 } | 867 } |
| 888 sources = [ | 868 sources = [ |
| 889 "numerics/exp_filter_unittest.cc", | 869 "numerics/exp_filter_unittest.cc", |
| 890 "numerics/percentile_filter_unittest.cc", | 870 "numerics/percentile_filter_unittest.cc", |
| 891 ] | 871 ] |
| 892 deps = [ | 872 deps = [ |
| 893 ":rtc_base_approved", | |
| 894 ":rtc_base_tests_main", | 873 ":rtc_base_tests_main", |
| 895 ":rtc_numerics", | 874 ":rtc_numerics", |
| 896 "../test:test_support", | |
| 897 ] | 875 ] |
| 898 } | 876 } |
| 899 | 877 |
| 900 config("rtc_base_unittests_config") { | 878 config("rtc_base_unittests_config") { |
| 901 if (is_clang) { | 879 if (is_clang) { |
| 902 cflags = [ "-Wno-unused-const-variable" ] | 880 cflags = [ "-Wno-unused-const-variable" ] |
| 903 } | 881 } |
| 904 } | 882 } |
| 905 rtc_source_set("rtc_base_unittests") { | 883 rtc_source_set("rtc_base_unittests") { |
| 906 testonly = true | 884 testonly = true |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 } | 930 } |
| 953 if (is_posix) { | 931 if (is_posix) { |
| 954 sources += [ | 932 sources += [ |
| 955 "ssladapter_unittest.cc", | 933 "ssladapter_unittest.cc", |
| 956 "sslidentity_unittest.cc", | 934 "sslidentity_unittest.cc", |
| 957 "sslstreamadapter_unittest.cc", | 935 "sslstreamadapter_unittest.cc", |
| 958 ] | 936 ] |
| 959 } | 937 } |
| 960 deps = [ | 938 deps = [ |
| 961 ":rtc_base_tests_main", | 939 ":rtc_base_tests_main", |
| 962 ":rtc_base_tests_utils", | |
| 963 "../test:test_support", | |
| 964 ] | 940 ] |
| 965 public_deps = [ | 941 public_deps = [ |
| 966 ":rtc_base", | 942 ":rtc_base", |
| 967 ] | 943 ] |
| 968 configs += [ ":rtc_base_unittests_config" ] | 944 configs += [ ":rtc_base_unittests_config" ] |
| 969 if (!build_with_chromium && is_clang) { | 945 if (!build_with_chromium && is_clang) { |
| 970 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 946 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 971 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 947 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 972 } | 948 } |
| 973 } | 949 } |
| 974 } | 950 } |
| 975 | 951 |
| 976 if (is_android) { | 952 if (is_android) { |
| 977 android_library("base_java") { | 953 android_library("base_java") { |
| 978 java_files = [ | 954 java_files = [ |
| 979 "java/src/org/webrtc/Logging.java", | 955 "java/src/org/webrtc/Logging.java", |
| 980 "java/src/org/webrtc/Size.java", | 956 "java/src/org/webrtc/Size.java", |
| 981 "java/src/org/webrtc/ThreadUtils.java", | 957 "java/src/org/webrtc/ThreadUtils.java", |
| 982 ] | 958 ] |
| 983 } | 959 } |
| 984 } | 960 } |
| OLD | NEW |